]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agomtd: m25p80: Add dual read support
Geert Uytterhoeven [Tue, 21 Jan 2014 12:59:18 +0000 (13:59 +0100)]
mtd: m25p80: Add dual read support

Add support for Dual SPI read transfers, which is supported by some
Spansion SPI FLASHes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoENGR00269945: ARM: dts: add max7310 support for imx6qdl-sabreauto
Shawn Guo [Sun, 14 Jul 2013 14:17:16 +0000 (22:17 +0800)]
ENGR00269945: ARM: dts: add max7310 support for imx6qdl-sabreauto

On imx6qdl-sabreauto board, there are three IO expanders implemented by
max7310, which are all controlled by I2C3.  And GPIO5_4 is steering the
I2C3_SDA availability, while GPIO1_15 is used to reset max7310.

[shawn.guo: cherry-pick commit b938a6cb0d4c from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi

9 years agoENGR00269945: pinctrl: support pinctrl setting assertion via gpios
Shawn Guo [Mon, 15 Jul 2013 08:31:53 +0000 (16:31 +0800)]
ENGR00269945: pinctrl: support pinctrl setting assertion via gpios

It's pretty common that on some reference design or validation boards,
one pin could be used by two devices on board, and the pin route is
controlled by a GPIO.  So to assert the pin for given device, not only
the pinmux controller in SoC needs to be set up properly but also the
GPIO needs to be pulled up/down.

The patch adds support of a device tree property "pinctrl-assert-gpios"
under client device node.  It plays pretty much like a board level pin
multiplexer, and steers the pin route by controlling the GPIOs.  When
client device has the property represent in its node, pinctrl device
tree mapping function will firstly pull up/down the GPIOs to assert the
pins for the device at board level.

[shawn.guo: cherry-pick commit e5a718edab82 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00269945: gpio: pca953x: add device_reset() call
Shawn Guo [Sun, 14 Jul 2013 13:52:38 +0000 (21:52 +0800)]
ENGR00269945: gpio: pca953x: add device_reset() call

The pca953x type of devices, e.g. max7310, may have a reset which needs
to be handled to get the device start working.  Add a device_reset()
call for that, and defer the probe if the reset controller for that is
not ready yet.

[shawn.guo: cherry-pick commit e95dae89011e from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
drivers/gpio/gpio-pca953x.c

9 years agoENGR00269945: select ARCH_HAS_RESET_CONTROLLER for IMX
Shawn Guo [Sun, 14 Jul 2013 13:39:35 +0000 (21:39 +0800)]
ENGR00269945: select ARCH_HAS_RESET_CONTROLLER for IMX

Move ARCH_HAS_RESET_CONTROLLER from HAVE_IMX_SRC to ARCH_MXC to have it
selected for the whole IMX family instead of SRC (System Reset
Controller), since GPIO could be another reset controller in many cases.

[shawn.guo: cherry-pick commit 6d43306b9c80 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/mach-imx/Kconfig

9 years agoENGR00269945: reset: add dummy device_reset() for !CONFIG_RESET_CONTROLLER build
Shawn Guo [Sun, 14 Jul 2013 13:35:49 +0000 (21:35 +0800)]
ENGR00269945: reset: add dummy device_reset() for !CONFIG_RESET_CONTROLLER build

Add dummy device_reset() function for !CONFIG_RESET_CONTROLLER build,
so that we do not have to add #ifdef CONFIG_RESET_CONTROLLER in every
single client device drivers that call the function.

[shawn.guo: cherry-pick commit a9c086f35277 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00269945: reset: build in CONFIG_RESET_GPIO by default
Shawn Guo [Sun, 14 Jul 2013 13:10:37 +0000 (21:10 +0800)]
ENGR00269945: reset: build in CONFIG_RESET_GPIO by default

GPIO is widely used as the reset control for various devices.  Let's
build the support in by default.

[shawn.guo: cherry-pick commit 795fcb3bc5bb from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00269945: reset: register gpio-reset driver in arch_initcall
Shawn Guo [Sun, 14 Jul 2013 12:41:00 +0000 (20:41 +0800)]
ENGR00269945: reset: register gpio-reset driver in arch_initcall

It's a little bit late to register gpio-reset driver at module_init
time, because gpio-reset provides reset control via gpio for other
devices which are mostly probed at module_init time too.  And it
becomes even worse, when the gpio comes from IO expander on I2C bus,
e.g. pca953x.  In that case, gpio-reset needs to be ready before I2C
bus driver which is generally ready at subsys_initcall time.  Let's
register gpio-reset driver in arch_initcall() to have it ready early
enough.

The defer probe mechanism is not used here, because a reset controller
driver should be reasonably registered early than other devices.  More
importantly, defer probe doe not help in some nasty cases, e.g. the
gpio-pca953x device itself needs a reset from gpio-reset driver start
working.

[shawn.guo: cherry-pick commit 7153f05108ef from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoreset: Add driver for gpio-controlled reset pins
Philipp Zabel [Thu, 30 May 2013 09:09:00 +0000 (11:09 +0200)]
reset: Add driver for gpio-controlled reset pins

This driver implements a reset controller device that toggle a gpio
connected to a reset pin of a peripheral IC. The delay between assertion
and de-assertion of the reset signal can be configured via device tree.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
[shawn.guo: cherry-pick commit 27e3604c82cb from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
drivers/reset/Makefile

9 years agoENGR00317981: ARM: add imx_v7_defconfig
Shawn Guo [Mon, 16 Jun 2014 07:19:36 +0000 (15:19 +0800)]
ENGR00317981: ARM: add imx_v7_defconfig

Add a imx defconfig for ARMv7 only build.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00240988: ARM: dts: add gpu nodes for imx6q and imx6dl
Shawn Guo [Fri, 26 Jul 2013 08:50:49 +0000 (16:50 +0800)]
ENGR00240988: ARM: dts: add gpu nodes for imx6q and imx6dl

It adds gpu nodes for imx6q and imx6dl.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit dfbafe2b0b33 from imx_3.10.y, use macro
 for clock IDs and IRQ trigger type, and add power-domains]

9 years agoENGR00240988: ARM: imx6q: add dma_zone_size for GPU limit
Shawn Guo [Wed, 31 Jul 2013 02:24:07 +0000 (10:24 +0800)]
ENGR00240988: ARM: imx6q: add dma_zone_size for GPU limit

GPU has a limit on physical address that it accesses, which must be
below 2GiB.  Since i.MX6Q/DL maps system memory at 0x10000000 (offset
256MiB), we set dma_zone_size as (SZ_2G - SZ_256M) to ensure that.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit f12c42130ab4 from imx_3.10.y]

Conflicts:
arch/arm/mach-imx/Kconfig

9 years agoENGR00240988: ARM: imx6q: add gpu clock initialzatin code
Loren HUANG [Fri, 9 Nov 2012 04:47:10 +0000 (12:47 +0800)]
ENGR00240988: ARM: imx6q: add gpu clock initialzatin code

This is a cherry-pick of commit 80f38bb (ENGR00240988-3 Add gpu clock
initialzatin code) from 3.5.7 kernel.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit c905623ba3f9 from imx_3.10.y, and use
 macro for clock IDs]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: gpu-viv: use runtime pm for VDDPU management
Shawn Guo [Mon, 16 Jun 2014 06:48:01 +0000 (14:48 +0800)]
ENGR00317981: gpu-viv: use runtime pm for VDDPU management

On kernel 3.14, we use generic power domain for VDDPU management.  In
that case, GPU driver does not need to call regulator API to manage
VDDPU anymore.  Instead, it only needs to call runtime pm, which is
already being used by the driver.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6qdl: Allow disabling the PU regulator, add a enable ramp delay
Philipp Zabel [Thu, 6 Mar 2014 09:58:48 +0000 (10:58 +0100)]
ARM: dts: imx6qdl: Allow disabling the PU regulator, add a enable ramp delay

The PU regulator is enabled during boot, but not necessarily always-on.
It can be disabled by the generic pm domain framework when the PU power
domain is shut down. The ramp delay of 150 us might be a bit conservative,
the value is taken from the Freescale kernel.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6sl: Add power-domain information to gpc node
Philipp Zabel [Thu, 6 Mar 2014 09:58:47 +0000 (10:58 +0100)]
ARM: dts: imx6sl: Add power-domain information to gpc node

The PGC that is part of GPC controls isolation and power sequencing of the
power domains. The PU power domain will be handled by the generic pm domain
framework. It needs a phandle to the PU regulator to turn off power when
the domain is disabled and a list of clocks to be enabled during powerup
for reset propagation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6qdl: Add power-domain information to gpc node
Philipp Zabel [Thu, 6 Mar 2014 09:58:46 +0000 (10:58 +0100)]
ARM: dts: imx6qdl: Add power-domain information to gpc node

The PGC that is part of GPC controls isolation and power sequencing of the
power domains. The PU power domain will be handled by the generic pm domain
framework. It needs a phandle to the PU regulator to turn off power when
the domain is disabled, and a list of phandles to all clocks that must be
enabled during powerup for reset propagation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
[shawn.guo: use macro for clock IDs]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx6: gpc: Add PU power domain for GPU/VPU
Philipp Zabel [Thu, 6 Mar 2014 09:58:45 +0000 (10:58 +0100)]
ARM: imx6: gpc: Add PU power domain for GPU/VPU

When generic pm domain support is enabled, the PGC can be used
to completely gate power to the PU power domain containing GPU3D,
GPU2D, and VPU cores.
This code triggers the PGC powerdown sequence to disable the GPU/VPU
isolation cells and gate power and then disables the PU regulator.
To reenable, the reverse powerup sequence is triggered after the PU
regulator is enabled again.
The GPU and VPU devices in the PU power domain temporarily need
to be clocked during powerup, so that the reset machinery can work.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoDocumentation: Add device tree bindings for Freescale i.MX GPC
Philipp Zabel [Thu, 6 Mar 2014 09:58:44 +0000 (10:58 +0100)]
Documentation: Add device tree bindings for Freescale i.MX GPC

The i.MX6 contains a power controller that controls power gating and
sequencing for the SoC's power domains.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
[shawn.guo: update property name to be 'power-domains']
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agodrivercore: Bind/unbind power domain on probe/remove
Tomasz Figa [Thu, 8 May 2014 12:49:14 +0000 (14:49 +0200)]
drivercore: Bind/unbind power domain on probe/remove

On a number of platforms, devices are part of controllable power
domains, which need to be enabled before such devices can be accessed
and may be powered down when the device is idle to save some power.
This means that on systems that support power domain control using
generic power domains subsystem, it is necessary to add device to its
power domain before binding a driver to it and remove it from its power
domain after its driver is unbound to make sure that an unused device
does not affect power domain state.

Since this is not limited to particular busses and specific
archs/platforms, it is more convenient to do the above directly in
driver core, just as done with pinctrl default configuration. This patch
adds necessary code to really_probe() and __device_release_driver() to
achieve this and maintain consistent stack-like ordering of operations
happening when binding and unbinding a driver.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
[on i.MX6 GK802]
Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
[shawn.guo: http://thread.gmane.org/gmane.linux.kernel.samsung-soc/31029]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agobase: power: Add generic OF-based power domain look-up
Tomasz Figa [Thu, 8 May 2014 12:49:13 +0000 (14:49 +0200)]
base: power: Add generic OF-based power domain look-up

This patch introduces generic code to perform power domain look-up using
device tree and automatically bind devices to their power domains.
Generic device tree binding is introduced to specify power domains of
devices in their device tree nodes.

Backwards compatibility with legacy Samsung-specific power domain
bindings is provided, but for now the new code is not compiled when
CONFIG_ARCH_EXYNOS is selected to avoid collision with legacy code. This
will change as soon as Exynos power domain code gets converted to use
the generic framework in further patch.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
[on i.MX6 GK802]
Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
[shawn.guo: http://thread.gmane.org/gmane.linux.kernel.samsung-soc/31029]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: regulator: anatop: force vddpu to use same voltage level as vddsoc
Shawn Guo [Mon, 16 Jun 2014 06:11:51 +0000 (14:11 +0800)]
ENGR00317981: regulator: anatop: force vddpu to use same voltage level as vddsoc

The anatop on i.MX6 requires that vddpu use the same voltage level as
vddsoc.  It's a quick hacking to force the check whenever vddpu is
about to be enabled.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoregulator: anatop: Remove checking control_reg in [set|get]_voltage_sel
Axel Lin [Sat, 22 Feb 2014 04:53:18 +0000 (12:53 +0800)]
regulator: anatop: Remove checking control_reg in [set|get]_voltage_sel

Remove checking control_reg in [set|get]_voltage_sel and then convert to use
regulator_[set|get]_voltage_sel_regmap for [set|get]_voltage_sel callbacks.

The anatop-reg-offset property is a required property rather than optional
property. So the question is what is the meaning of setting anatop-reg-offset
to 0? If 0 is a valid setting for anatop-reg-offset and it has special meaning,
we had better document it in the binding document. Otherwise, remove the testing
for control_reg in the driver.

No anatop voltage regulator node in the dts files set anatop-reg-offset to 0.
So I think it's safe to remove testing if control_reg is 0.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
[shawn.guo: cherry-pick commit 114c5748d540 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoregulator: anatop: Add bypass support to digital LDOs
Philipp Zabel [Tue, 11 Feb 2014 13:43:45 +0000 (14:43 +0100)]
regulator: anatop: Add bypass support to digital LDOs

The ARM, PU, and SOC LDOs in the i.MX6 PMU can operate
in bypass mode. This allows to use external switching
regulators for cpu voltage scaling.

Since bypass and power gating modes are not configured
with their own bits, but via the voltage target bitfield,
store bypass state to be restored when reenabling the
regulator.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
[shawn.guo: cherry-pick commit d38018f2019c from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoregulator: anatop: Add power gating support to digital LDOs
Philipp Zabel [Tue, 11 Feb 2014 13:43:44 +0000 (14:43 +0100)]
regulator: anatop: Add power gating support to digital LDOs

The ARM, PU, and SOC LDOs in the i.MX6 PMU can completely gate
their power output. Since power gating is configured by writing
zero to the voltage target bitfield,, store a copy of the
voltage selector to be restored when reenabling the regulator.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
[shawn.guo: cherry-pick commit 605ebd35f059 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: ARM: dts: imx6qdl: add LDB and LCD for imx6qdl-sabresd
Shawn Guo [Sun, 15 Jun 2014 03:55:24 +0000 (11:55 +0800)]
ENGR00317981: ARM: dts: imx6qdl: add LDB and LCD for imx6qdl-sabresd

It's a device tree source porting from imx_3.10.y regarding to LDB and
LCD support on imx6qdl-sabresd board.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00274172-1 ARM: imx6q: refactor some ldb related clocks
Liu Ying [Tue, 20 Aug 2013 06:37:47 +0000 (14:37 +0800)]
ENGR00274172-1 ARM: imx6q: refactor some ldb related clocks

The ldb_di[0|1]_ipu_div dividers may divide their parent clock
frequencies by either 3.5 or 7. The non-integral dividers cannot
be dealt with the common clock framework, so they cannot be
registered as common clock dividers. So this patch adds a fixed
factor clock of 1/7 and introduces ldb_di[0|1]_div_sel multiplexers
so that the fixed factor clocks of 1/3.5 and 1/7 can be set to be
the parents of ldb_di[0|1]_div_sel multiplexers. The ldb_di[0|1]_podf
dividers are no longer used then.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
[shawn.guo: cherry-pick commit aae58d71b525 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
Documentation/devicetree/bindings/clock/imx6q-clock.txt
arch/arm/mach-imx/clk-imx6q.c

9 years agoENGR00317981: ARM: imx6qdl: initialize IPU clocks
Shawn Guo [Sun, 15 Jun 2014 14:20:36 +0000 (22:20 +0800)]
ENGR00317981: ARM: imx6qdl: initialize IPU clocks

Initialize IPU related clock in the same way as imx_v3.10.y

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6qdl: use DT macro for clock ID
Shawn Guo [Sun, 15 Jun 2014 12:36:50 +0000 (20:36 +0800)]
ARM: dts: imx6qdl: use DT macro for clock ID

Switch to use DT macro for clock ID, so that device tree source is more
readable.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick from community IMX tree]

Conflicts:
arch/arm/boot/dts/imx6dl.dtsi
arch/arm/boot/dts/imx6qdl.dtsi

9 years agoARM: imx6qdl: switch to use macro for clock ID
Shawn Guo [Sun, 15 Jun 2014 11:35:10 +0000 (19:35 +0800)]
ARM: imx6qdl: switch to use macro for clock ID

Instead of using enum for clock ID, let's switch imx6qdl clock driver to
use macro.  In this case, device tree can reuse these macros to improve
readability.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick from community IMX tree]

Conflicts:
arch/arm/mach-imx/clk-imx6q.c

9 years agoARM: dts: imx6: i2c4 cleanup
Iain Paton [Fri, 9 May 2014 15:01:56 +0000 (16:01 +0100)]
ARM: dts: imx6: i2c4 cleanup

add missing i2c4 clock and correct the compatible string to match other
imx6 i2c blocks

Signed-off-by: Iain Paton<ipaton0@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick from community IMX tree]

9 years agoARM: imx6: clk: i.MX6 DualLite/Solo i2c4 clock
Iain Paton [Wed, 16 Apr 2014 18:33:24 +0000 (19:33 +0100)]
ARM: imx6: clk: i.MX6 DualLite/Solo i2c4 clock

Compared to i.MX6 Quad/Dual the CCM_CCGR1 register in the i.MX6 Solo/DualLite
replaces the ecspi5 clock with the i2c4 clock.

Handle this difference using cpu_is_imx6dl().

Signed-off-by: Iain Paton <ipaton0@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit ee3387f97bea from upstream]

9 years agoARM: imx6q: clk: Parent DI clocks to video PLL via di_pre_sel
Sascha Hauer [Mon, 14 Apr 2014 14:20:39 +0000 (16:20 +0200)]
ARM: imx6q: clk: Parent DI clocks to video PLL via di_pre_sel

Route the video PLL to the display interface clocks via the di_pre_sel
and di_sel muxes by default.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit 17b9b3b9e88a from upstream]

9 years agoARM: imx6q: add the missing esai_ahb clock
Shawn Guo [Sat, 19 Apr 2014 03:15:06 +0000 (11:15 +0800)]
ARM: imx6q: add the missing esai_ahb clock

The esai_ahb clock is derived from ahb and used to provide ESAI the
capability of register accessing and FSYS clock source for I2S clocks
dividing.  The gate bits of this esai_ahb clock are shared with the
esai clock -- the baud clock, so we need to call imx_clk_gate2_shared()
for these two clocks.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
[shawn.guo: cherry-pick commit 886cda418b28 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: media: mxc_pxp_v4l2: change __s32 to __u32
Shawn Guo [Fri, 13 Jun 2014 09:19:47 +0000 (17:19 +0800)]
ENGR00317981: media: mxc_pxp_v4l2: change __s32 to __u32

Commit f90580ca0133 ([media] videodev2: Set vb2_rect's width and height
as unsigned) changes v4l2_rect's width and height from __s32 to __u32,
and thus we see the build error below.

  CC      drivers/media/platform/mxc/output/mxc_pxp_v4l2.o
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c: In function â€˜pxp_try_fmt_output_overlay’:
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c:605:16: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c:607:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Fix the error by changing __s32 to __u32.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: media: forward mxc video output drivers to 3.14 kernel
Shawn Guo [Fri, 13 Jun 2014 09:16:59 +0000 (17:16 +0800)]
ENGR00317981: media: forward mxc video output drivers to 3.14 kernel

Forward imx_3.10.y mxc video output drivers to 3.14 kernel.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00268508 backlight:Correct the setting for bd props.fb_blank
Liu Ying [Tue, 25 Jun 2013 09:13:33 +0000 (17:13 +0800)]
ENGR00268508 backlight:Correct the setting for bd props.fb_blank

The patch of "ENGR00264855 backlight: Support backlight shared by
multiple fbs" doesn't consider that bd->props.fb_blank could be
shared by several framebuffers which use the same backlight device.
This causes the pwm backlight wrongly check the fb blank status.
This patch corrects the setting for the fb blank status by
considering all the framebuffers in question to fix the issue.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 68b97d114629f22f64b3d8c14d0a0b7d07d6ebb2)
[shawn.guo: cherry-pick commit 8a03a96fba08 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00264855 backlight: Support backlight shared by multiple fbs
Liu Ying [Thu, 30 May 2013 05:56:17 +0000 (13:56 +0800)]
ENGR00264855 backlight: Support backlight shared by multiple fbs

One backlight device may shared by multiple framebuffers.
We don't hope blanking one of the framebuffers may turn the
backlight off for all the other framebuffers, since they are
likely active to show display content. This patch adds logic
to record each framebuffer's backlight usage to determine the
backlight device use count and whether the backlight should be
turned on or off.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 37cbf741e4dff1f757f3ade6bb861d9a2af70693)
[shawn.guo: cherry-pick commit d62e7e8a788b from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: iomuxc-gpr: forward imx6q-iomuxc-gpr.h to 3.14 kernel
Shawn Guo [Thu, 12 Jun 2014 06:52:33 +0000 (14:52 +0800)]
ENGR00317981: iomuxc-gpr: forward imx6q-iomuxc-gpr.h to 3.14 kernel

Forward imx_3.10.y imx6q-iomuxc-gpr.h to 3.14 kernel.

Keep IMX6Q_GPR1_GINT for need from arch/arm/mach-imx/pm-imx6.c

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: video: forward mxc video drivers to 3.14 kernel
Shawn Guo [Thu, 12 Jun 2014 07:12:20 +0000 (15:12 +0800)]
ENGR00317981: video: forward mxc video drivers to 3.14 kernel

Forward imx_3.10_y mxc video drivers to 3.14 kernel.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: mfd: forward mxc hdmi mfd driver to 3.14 kernel
Shawn Guo [Thu, 12 Jun 2014 08:23:33 +0000 (16:23 +0800)]
ENGR00317981: mfd: forward mxc hdmi mfd driver to 3.14 kernel

Forward imx_3.10.y mxc hdmi mfd driver to 3.14 kernel.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00275031-1 mx6sl fb: support lcdif framebuffer on 3.10
Robby Cai [Thu, 22 Aug 2013 06:35:09 +0000 (14:35 +0800)]
ENGR00275031-1 mx6sl fb: support lcdif framebuffer on 3.10

re-use the upstreaming mxsfb.c code.
- add the lcdif axi clock for register and dram access
- set the lcdif pix's parent as pll5_video to get most accurate pix clock
- add binding doc for lcdif dts

Signed-off-by: Robby Cai <R63905@freescale.com>
[shawn.guo: cherry-pick commit 423273b4437f from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
drivers/video/mxsfb.c

9 years agoENGR00317981: pxp: use DMA_COMPLETE for dma completion status
Shawn Guo [Thu, 12 Jun 2014 07:43:56 +0000 (15:43 +0800)]
ENGR00317981: pxp: use DMA_COMPLETE for dma completion status

DMA_SUCCESS is removed by commit 7db5f7274a0b (dmaengine: remove unused
DMA_SUCCESS).  Let's follow commit 409bff6a0f46 (dmaengine: imx-sdma: use
DMA_COMPLETE for dma completion status) to use DMA_COMPLETE instead.

This is to fix the following build error.

  CC      drivers/dma/pxp/pxp_dma_v2.o
drivers/dma/pxp/pxp_dma_v2.c: In function â€˜pxp_tx_status’:
drivers/dma/pxp/pxp_dma_v2.c:1512:9: error: â€˜DMA_SUCCESS’ undeclared (first use in this function)

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: pxp: forward pxp driver to 3.14 kernel
Shawn Guo [Thu, 12 Jun 2014 07:27:57 +0000 (15:27 +0800)]
ENGR00317981: pxp: forward pxp driver to 3.14 kernel

Forward imx_3.10.y pxp driver to 3.14 kernel.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: drm: vivante: drm_platform_exit is gone
Shawn Guo [Fri, 13 Jun 2014 03:37:29 +0000 (11:37 +0800)]
ENGR00317981: drm: vivante: drm_platform_exit is gone

The function drm_platform_exit() is removed by commit e2577d455adb (drm:
rip out drm_platform_exit).  To fix the build error below, we need to
call drm_put_dev directly.

  CC      drivers/gpu/drm/vivante/vivante_drv.o
drivers/gpu/drm/vivante/vivante_drv.c: In function â€˜vivante_exit’:
drivers/gpu/drm/vivante/vivante_drv.c:100:3: error: implicit declaration of function â€˜drm_platform_exit’ [-Werror=implicit-function-declaration]

Note, this only works with commit "ENGR00317981: drm: set drm_device
pointer into drvdata".

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: drm: set drm_device pointer into drvdata
Shawn Guo [Fri, 13 Jun 2014 08:02:58 +0000 (16:02 +0800)]
ENGR00317981: drm: set drm_device pointer into drvdata

If drvdata is not used by platform driver, let's set drm_device
pointer into it.  We take this as the default usage of drvdata,
and platform driver is free to overwrite it later as needed.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: drm: vivante: flag DRIVER_USE_MTRR is gone
Shawn Guo [Fri, 13 Jun 2014 02:45:39 +0000 (10:45 +0800)]
ENGR00317981: drm: vivante: flag DRIVER_USE_MTRR is gone

The flag DRIVER_USE_MTRR is removed by commit 281856477cda (drm: rip out
drm_core_has_MTRR checks).  Drop it from vivante driver to fix the build
error below.

  CC      drivers/gpu/drm/vivante/vivante_drv.o
drivers/gpu/drm/vivante/vivante_drv.c:72:21: error: â€˜DRIVER_USE_MTRR’ undeclared here (not in a function)

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: drm: vivante: drm_fasync is gone
Shawn Guo [Fri, 13 Jun 2014 02:41:19 +0000 (10:41 +0800)]
ENGR00317981: drm: vivante: drm_fasync is gone

The drm_fasync() is gone since commit b0e898ac555e (drm: remove FASYNC
support).  Remove it from vivante driver to fix the build error below.

  CC      drivers/gpu/drm/vivante/vivante_drv.o
drivers/gpu/drm/vivante/vivante_drv.c:68:12: error: â€˜drm_fasync’ undeclared here (not in a function)

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: drm: forward vivante driver to 3.14 kernel
Shawn Guo [Fri, 13 Jun 2014 02:36:33 +0000 (10:36 +0800)]
ENGR00317981: drm: forward vivante driver to 3.14 kernel

Forward imx_3.10.y vivante drm driver to 3.14 kernel.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: gpu-viv: use reinit_completion instead of INIT_COMPLETION
Shawn Guo [Thu, 12 Jun 2014 06:02:43 +0000 (14:02 +0800)]
ENGR00317981: gpu-viv: use reinit_completion instead of INIT_COMPLETION

INIT_COMPLETION was removed by commit 62026aedaace (sched: remove
INIT_COMPLETION), so we're seeing the following build error.

  CC      drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.o
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c: In function â€˜gckOS_Signal’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7506:9: error: implicit declaration of function â€˜INIT_COMPLETION’ [-Werror=implicit-function-declaration]

Follow commit 16735d022f72 (tree-wide: use reinit_completion instead of
INIT_COMPLETION) to fix the error.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: mxc: forward mxc drivers to 3.14 kernel
Shawn Guo [Thu, 12 Jun 2014 02:13:32 +0000 (10:13 +0800)]
ENGR00317981: mxc: forward mxc drivers to 3.14 kernel

Forward imx_3.10.y mxc drivers to 3.14 kernel.  This includes all
the imx_3.10.y drivers in drivers/mxc folder except ASRC.  We will try
to use upstream ASRC driver on 3.14 kernel.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00275542-4 ARM: imx: Enable thermal driver for i.MX6SL
Anson Huang [Mon, 19 Aug 2013 20:19:34 +0000 (16:19 -0400)]
ENGR00275542-4 ARM: imx: Enable thermal driver for i.MX6SL

Add thermal dts to enable thermal driver for i.MX6SL.

Signed-off-by: Anson Huang <b20788@freescale.com>
[shawn.guo: cherry-pick commit 72e3326a6020 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6qdl: add necessary thermal clk
Anson Huang [Thu, 19 Dec 2013 18:17:23 +0000 (13:17 -0500)]
ARM: dts: imx6qdl: add necessary thermal clk

Thermal sensor needs pll3_usb_otg when measuring temperature,
so we need to pass clk info to thermal driver.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit f430d19c371f from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agothermal: imx: update formula for thermal sensor
Anson Huang [Wed, 12 Feb 2014 10:06:35 +0000 (18:06 +0800)]
thermal: imx: update formula for thermal sensor

Thermal sensor used to need two calibration points which are
in fuse map to get a slope for converting thermal sensor's raw
data to real temperature in degree C. Due to the chip calibration
limitation, hardware team provides an universal formula to get
real temperature from internal thermal sensor raw data:

Slope = 0.4297157 - (0.0015976 * 25C fuse);

Update the formula, as there will be no hot point calibration
data in fuse map from now on.

Signed-off-by: Anson Huang <b20788@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[shawn.guo: cherry-pick commit 749e8be71d61 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00274056-1 thermal: add device cooling for thermal driver
Anson Huang [Thu, 8 Aug 2013 17:20:40 +0000 (13:20 -0400)]
ENGR00274056-1 thermal: add device cooling for thermal driver

cpu cooling is not enough when temperature is
too hot, as some devices may contribute a lot of heat
to SOC, such as GPU, so we need to add device cooling
as well, when system is too hot, devices can also take
their actions to lower SOC temperature.

when temperature cross the passive trip, device cooling
driver will send out notification, those devices who
register this devfreq_cooling notification will take
actions to lower SOC temperature.

Signed-off-by: Anson Huang <b20788@freescale.com>
[shawn.guo: cherry-pick commit 71493e909a65 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: busfreq: fix the use of MT_MEMORY_NONCACHED
Shawn Guo [Thu, 12 Jun 2014 02:56:24 +0000 (10:56 +0800)]
ENGR00317981: busfreq: fix the use of MT_MEMORY_NONCACHED

Since commit 2e2c9de207be (ARM: add permission annotations to MT_MEMORY*
mapping types), MT_MEMORY_NONCACHED is not available any more.  Thus, we
see following build error.

  CC      arch/arm/mach-imx/busfreq_ddr3.o
arch/arm/mach-imx/busfreq_ddr3.c: In function â€˜init_mmdc_settings’:
arch/arm/mach-imx/busfreq_ddr3.c:464:7: error: â€˜MT_MEMORY_NONCACHED’ undeclared (first use in this function)

Fix it by using the new enum MT_MEMORY_RWX_NONCACHED.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00278432 [MX6x:Busfreq] Fix build warning.
Ranjani Vaidyanathan [Thu, 5 Sep 2013 22:06:10 +0000 (17:06 -0500)]
ENGR00278432 [MX6x:Busfreq] Fix build warning.

Fix build warning in arch/arm/mach-imx/busfreq_ddr3.c.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
[shawn.guo: cherry-pick commit 312864a0b7e7 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00275974-1 [iMX6DQ/iMX6DL] Add busfreq support
Ranjani Vaidyanathan [Tue, 20 Aug 2013 19:30:16 +0000 (14:30 -0500)]
ENGR00275974-1 [iMX6DQ/iMX6DL] Add busfreq support

Add support to drop DDR and AHB frequency to 24MHz in
system IDLE state.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
[shawn.guo: cherry-pick commit 7091e3d1c771 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agousb: phy: mxs: Add sync time after controller clear phcd
Peter Chen [Mon, 24 Feb 2014 02:21:04 +0000 (10:21 +0800)]
usb: phy: mxs: Add sync time after controller clear phcd

After clear portsc.phcd, PHY needs 200us stable time for switch
32K clock to AHB clock.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 47d1845ffac0 from upstream]

9 years agousb: phy: mxs: Add system suspend/resume API
Peter Chen [Mon, 24 Feb 2014 02:21:03 +0000 (10:21 +0800)]
usb: phy: mxs: Add system suspend/resume API

We need this to keep PHY's power on or off during the system
suspend mode. If we need to enable USB wakeup, then we
must keep PHY's power being on during the system suspend mode.
Otherwise, we need to keep PHY's power being off to save power.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit bf7834380086 from upstream]

9 years agousb: phy: mxs: Add implementation of set_wakeup
Peter Chen [Mon, 24 Feb 2014 02:21:02 +0000 (10:21 +0800)]
usb: phy: mxs: Add implementation of set_wakeup

When we need the PHY can be waken up by external signals,
we can call this API. Besides, we call mxs_phy_disconnect_line
at this API to close the connection between USB PHY and
controller, after that, the line state from controller is SE0.
Once the PHY is out of power, without calling mxs_phy_disconnect_line,
there are unknown wakeups due to dp/dm floating at device mode.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 3f1265056be0 from upstream]

9 years agousb: phy: Add set_wakeup API
Peter Chen [Mon, 24 Feb 2014 02:21:01 +0000 (10:21 +0800)]
usb: phy: Add set_wakeup API

This API is used to set wakeup enable at PHY registers, in that
case, the PHY can be waken up from suspend due to external events,
like vbus change, dp/dm change and id change.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 57bf9b09a6ad from upstream]

9 years agousb: phy: mxs: add controller id
Peter Chen [Mon, 24 Feb 2014 02:21:00 +0000 (10:21 +0800)]
usb: phy: mxs: add controller id

It is used to access un-regulator registers according to
different controllers.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 83be181b6422 from upstream]

9 years agousb: phy: mxs: Enable IC fixes for related SoCs
Peter Chen [Mon, 24 Feb 2014 02:20:59 +0000 (10:20 +0800)]
usb: phy: mxs: Enable IC fixes for related SoCs

Two PHY bugs are fixed by IC logic, but these bits are not
enabled by default, so we enable them at driver.
The two bugs are: MXS_PHY_ABNORMAL_IN_SUSPEND and MXS_PHY_SENDING_SOF_TOO_FAST
which are described at code.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 22db05ecf2ba from upstream]

9 years agousb: phy: mxs: change description of usb device speed
Peter Chen [Mon, 24 Feb 2014 02:20:58 +0000 (10:20 +0800)]
usb: phy: mxs: change description of usb device speed

Change "high speed" to "HS"
Change "non-high speed" to "FS/LS"

Implementation of notify_suspend and notify_resume will be different
according to mxs_phy_data->flags.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit f6a158243e56 from upstream]

9 years agousb: phy: mxs: Add anatop regmap
Peter Chen [Mon, 24 Feb 2014 02:20:57 +0000 (10:20 +0800)]
usb: phy: mxs: Add anatop regmap

It is needed by imx6 SoC series, but not for imx23 and imx28.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 0d896538d836 from upstream]

9 years agousb: doc: phy-mxs: update binding for adding anatop phandle
Peter Chen [Mon, 24 Feb 2014 02:20:56 +0000 (10:20 +0800)]
usb: doc: phy-mxs: update binding for adding anatop phandle

Add anatop phandle which is used to access anatop registers to
control PHY's power and other USB operations.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit d9c130328d2e from upstream]

9 years agousb: phy: mxs: Add auto clock and power setting
Peter Chen [Mon, 24 Feb 2014 02:20:55 +0000 (10:20 +0800)]
usb: phy: mxs: Add auto clock and power setting

The auto setting is used to open related power and clocks
automatically after receiving wakeup signal.

With this feature, the PHY's clock and power can be recovered
correctly from low power mode, it is guaranteed by IC logic.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 1364414411ac from upstream]

9 years agousb: phy: mxs: Add platform judgement code
Peter Chen [Mon, 24 Feb 2014 02:20:54 +0000 (10:20 +0800)]
usb: phy: mxs: Add platform judgement code

The mxs-phy has several bugs and features at different
versions, the driver code can get it through of_device_id.data.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 2400780ea18a from upstream]

9 years agousb: doc: phy-mxs: Add more compatible strings
Peter Chen [Mon, 24 Feb 2014 02:20:53 +0000 (10:20 +0800)]
usb: doc: phy-mxs: Add more compatible strings

Add "fsl,imx6q-usbphy" for imx6dq and imx6dl, add
"fsl,imx6sl-usbphy" for imx6sl, and "fsl,imx23-usbphy"
is still a fallback for other strings.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[shawn.guo: cherry-pick commit 14de8c3a62b9 from upstream]

9 years agousb: chipidea: udc: refine ep operation at isr_tr_complete_handler
Peter Chen [Wed, 19 Feb 2014 05:41:41 +0000 (13:41 +0800)]
usb: chipidea: udc: refine ep operation at isr_tr_complete_handler

- delete the warning message at interrupt handler, and adds judgement at
ep_enable, if non-ep0 requests ctrl transfer, it will indicate an error.
- delete hw_test_and_clear_setup_status which is a broken code
- Tested with g_mass_storage, g_ncm, g_ether

Cc: matthieu.castet@parrot.com
Reported-by: Michael Grzeschik <mgr@pengutronix.de>
Acked-by: Michael Grzeschik <mgr@pengutronix.de>
Tested-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[shawn.guo: cherry-pick commit 64fc06c40e01 from upstream]

9 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>
[shawn.guo: cherry-pick commit c859aa65a7ec from upstream]

9 years agoARM: dts: imx6: add mxs phy controller id
Peter Chen [Fri, 20 Dec 2013 07:52:05 +0000 (15:52 +0800)]
ARM: dts: imx6: add mxs phy controller id

We need to use controller id to access different register regions
for mxs phy.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 8189c51f1846 from upstream]

9 years agoARM: dts: imx6: add anatop phandle for usbphy
Peter Chen [Fri, 20 Dec 2013 07:52:01 +0000 (15:52 +0800)]
ARM: dts: imx6: add anatop phandle for usbphy

Add anatop phandle for usbphy

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 76a388550675 from upstream]

9 years agoARM: dts: imx6qdl: use interrupts-extended for fec
Troy Kisky [Fri, 20 Dec 2013 18:47:10 +0000 (11:47 -0700)]
ARM: dts: imx6qdl: use interrupts-extended for fec

We need to be able to override interrupts in board file to
workaround a hardware bug for ethernet interrupts
waking the processor by using interrupts-extended.
So, use interrupts-extended here as well.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 454cf8f54d99 from upstream]

9 years agoARM: dts: imx: pinfunc: add MX6QDL_PAD_GPIO_6__ENET_IRQ
Troy Kisky [Fri, 20 Dec 2013 18:47:07 +0000 (11:47 -0700)]
ARM: dts: imx: pinfunc: add MX6QDL_PAD_GPIO_6__ENET_IRQ

From "Chip Errata for the i.MX 6Dual/6Quad"

ERR006687 ENET: Only the ENET wake-up interrupt request can wake the
system from Wait mode.

The ENET block generates many interrupts. Only one of these interrupt lines
is connected to the General Power Controller (GPC) block, but a logical OR
of all of the ENET interrupts is connected to the General Interrupt Controller
(GIC). When the system enters Wait mode, a normal RX Done or TX Done does not
wake up the system because the GPC cannot see this interrupt. This impacts
performance of the ENET block because its interrupts are serviced only when
the chip exits Wait mode due to an interrupt from some other wake-up source.

Adding MX6QDL_PAD_GPIO_6__ENET_IRQ is the 1st step to
workaround this problem.

The input reg is set to 0x3c to set IOMUX_OBSRV_MUX1 to ENET_IRQ.
The mux reg value is 0x11, so that the observable mux is routed to
this pin and to the gpio controller(sion bit). These magic values
come from Ranjani Vaidyanathan's patch:
"ENGR00257847-1 MX6Q/DL-Fix Ethernet performance issue when WAIT mode is active"

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
CC: Ranjani Vaidyanathan <ra5478@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit d8c765e0d1dd from upstream]

9 years agoARM: dts: imx: imx6qdl.dtsi: use IRQ_TYPE_LEVEL_HIGH
Troy Kisky [Thu, 14 Nov 2013 21:02:13 +0000 (14:02 -0700)]
ARM: dts: imx: imx6qdl.dtsi: use IRQ_TYPE_LEVEL_HIGH

Make the interrupts node slightly more readable.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 275c08b56992 from upstream]

9 years agoARM: dts: imx: imx6sl.dtsi: use IRQ_TYPE_LEVEL_HIGH
Troy Kisky [Thu, 14 Nov 2013 21:02:12 +0000 (14:02 -0700)]
ARM: dts: imx: imx6sl.dtsi: use IRQ_TYPE_LEVEL_HIGH

Make the interrupts node slightly more readable.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 13088c2309e0 from upstream]

9 years agoARM: dts: imx: imx6dl.dtsi: use IRQ_TYPE_LEVEL_HIGH
Troy Kisky [Thu, 14 Nov 2013 21:02:11 +0000 (14:02 -0700)]
ARM: dts: imx: imx6dl.dtsi: use IRQ_TYPE_LEVEL_HIGH

Make the interrupts node slightly more readable.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit f89f5b4682b8 from upstream]

9 years agoARM: dts: imx: imx6q.dtsi: use IRQ_TYPE_LEVEL_HIGH
Troy Kisky [Thu, 14 Nov 2013 21:02:10 +0000 (14:02 -0700)]
ARM: dts: imx: imx6q.dtsi: use IRQ_TYPE_LEVEL_HIGH

Make the interrupts node slightly more readable.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit e6117ff3c62a from upstream]

9 years agoARM: dts: imx6: Use 'vddarm' as the regulator name
Fabio Estevam [Thu, 19 Dec 2013 23:08:52 +0000 (21:08 -0200)]
ARM: dts: imx6: Use 'vddarm' as the regulator name

Instead of calling the regulator for the ARM core as 'cpu', let's rename it
as 'vddarm', so that we keep a better consistency with the other internal
regulators:

vdd1p1: 800 <--> 1375 mV at 1100 mV
vdd3p0: 2800 <--> 3150 mV at 3000 mV
vdd2p5: 2000 <--> 2750 mV at 2400 mV
vddarm: 725 <--> 1450 mV at 1150 mV
vddpu: 725 <--> 1450 mV at 1150 mV
vddsoc: 725 <--> 1450 mV at 1200 mV

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 118c98a62eda from upstream]

9 years agoARM: dts: imx6qdl-sabresd: Add power key support
Anson Huang [Thu, 19 Dec 2013 21:07:24 +0000 (16:07 -0500)]
ARM: dts: imx6qdl-sabresd: Add power key support

This patch adds support for imx6qdl-sabresd board's power
key, the key is named "SW1" on board, press it can wake up
system from suspend.

Add a new pinctrl entry for gpio keys and move all gpio
keys pin to this entry.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 8e4422ae6b50 from upstream]

9 years agoARM: dts: imx6qdl: add spdif support for sabreauto
Nicolin Chen [Mon, 16 Dec 2013 10:37:48 +0000 (18:37 +0800)]
ARM: dts: imx6qdl: add spdif support for sabreauto

This patch adds spdif support for imx6qdl-sabreauto by inserting the cpu dai
node with pinctrl group and its ASoC dai link node.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 1169cf1f4d60 from upstream]

9 years agoARM: dts: imx: specify the value of audmux pinctrl instead of 0x80000000
Nicolin Chen [Sat, 8 Feb 2014 02:14:28 +0000 (10:14 +0800)]
ARM: dts: imx: specify the value of audmux pinctrl instead of 0x80000000

We must specify the value of audmux pinctrl if we want to use pinctrl_pm().
Thus change bypass value 0x80000000 to what we exactly need.

This patch also seperately unset PUE bit for TXD so that IOMUX won't pull
up/down the pin after turning into tristate. When we use SSI normal mode to
playback monaural audio via I2S signal, there'd be a pulled curve occur to
its signal at the second slot if setting PUE bit for TXD. And it will make
the second channel to play a constant noise. So by keeping the signal level
in the second slot, we can get a constant high level signal (-1) or a low
level one (0).

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 77112dd58aa4 from upstream]

9 years agoARM: dts: imx6: use generic node name for fixed regulator
Shawn Guo [Fri, 7 Feb 2014 15:22:50 +0000 (23:22 +0800)]
ARM: dts: imx6: use generic node name for fixed regulator

The device tree specification recommends that generic name should be
used for nodes.  So instead of naming those fixed regulator nodes
arbitrarily, let's use the generic name 'regulator@num' for those nodes.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 56160e3361c6 from upstream]

9 years agoARM: dts: imx6sl: make pinctrl nodes board specific
Shawn Guo [Mon, 4 Nov 2013 02:49:04 +0000 (10:49 +0800)]
ARM: dts: imx6sl: make pinctrl nodes board specific

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that
boards that share the same pinctrl setting do not have to define it time
and time again in <board>.dts.  However, along with the devices and use
cases being added continuously, the pinctrl setting nodes under iomuxc
becomes more than expected.  This bloats device tree blob for particular
board unnecessarily since only a small subset of those pinctrl setting
nodes will be used by the board.  It impacts not only the DTB file size
but also the run-time device tree lookup efficiency.

The patch moves all the pinctrl data into individual boards as needed.
With the changes, the pinctrl setting nodes becomes local to particular
board, and it makes no sense to continue numbering the setting for
given peripheral.  Thus, all the pinctrl phandler name gets updated to
have only peripheral name in there.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick from commit fffaa65dc463 upstream]

9 years agoARM: dts: imx6qdl: make pinctrl nodes board specific
Shawn Guo [Wed, 23 Oct 2013 07:36:09 +0000 (15:36 +0800)]
ARM: dts: imx6qdl: make pinctrl nodes board specific

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that
boards that share the same pinctrl setting do not have to define it time
and time again in <board>.dts.  However, along with the devices and use
cases being added continuously, the pinctrl setting nodes under iomuxc
becomes more than expected.  This bloats device tree blob for particular
board unnecessarily since only a small subset of those pinctrl setting
nodes will be used by the board.  It impacts not only the DTB file size
but also the run-time device tree lookup efficiency.

The patch moves all the pinctrl data into individual boards as needed.
With the changes, the pinctrl setting nodes becomes local to particular
board, and it makes no sense to continue numbering the setting for
given peripheral.  Thus, all the pinctrl phandler name gets updated to
have only peripheral name in there.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 817c27a128e1 from upstream]

9 years agoARM: dts: imx6q-arm2: enable USB OTG
Peter Chen [Mon, 28 Oct 2013 06:05:02 +0000 (14:05 +0800)]
ARM: dts: imx6q-arm2: enable USB OTG

Enable USB OTG controller at imx6q-arm2 board

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 67339b35e521 from upstream]

9 years agoARM: dts: disable flexcan by default
Tim Harvey [Wed, 23 Oct 2013 04:51:27 +0000 (21:51 -0700)]
ARM: dts: disable flexcan by default

Typically nodes are disabled by default and enabled when needed.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit a113533726e9 from upstream]

9 years agoARM: dts: imx6sl: add ocram device support
Anson Huang [Mon, 6 Jan 2014 20:57:37 +0000 (15:57 -0500)]
ARM: dts: imx6sl: add ocram device support

Add ocram device support on i.MX6SL.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 248f15a36024 from upstream]

9 years agoARM: dts: imx6sl: Adding cpu frequency and VDDSOC/PU table.
John Tobias [Thu, 19 Dec 2013 20:35:36 +0000 (12:35 -0800)]
ARM: dts: imx6sl: Adding cpu frequency and VDDSOC/PU table.

Device tree for iMX6SL doesn't have an existing cpu frequency table
as well as the VDDSOC/PU.

Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit b0d300d3a22c from upstream]

9 years agoARM: dts: imx6dl: enable cpufreq support
Anson Huang [Thu, 19 Dec 2013 15:02:10 +0000 (10:02 -0500)]
ARM: dts: imx6dl: enable cpufreq support

This patch adds cpufreq dts for i.mx6dl to support cpufreq driver.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 978ed904c17c from upstream]

9 years agoARM: dts: imx6q: add 852MHz setpoint for CPU freq
Anson Huang [Wed, 12 Feb 2014 09:57:02 +0000 (17:57 +0800)]
ARM: dts: imx6q: add 852MHz setpoint for CPU freq

According to datasheet, i.MX6Q has setpoint of 852MHz
which is exclusive with 996MHz, the fuse map of speed_grading
defines the max speed of ARM, here we add this 852MHz
setpoint opp info, kernel will check the speed_grading
fuse and remove all illegal setpoints.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 89ef8ef45e96 from upstream]

9 years agoARM: dts: imx6q: add vddsoc/pu setpoint info
Anson Huang [Thu, 19 Dec 2013 14:16:48 +0000 (09:16 -0500)]
ARM: dts: imx6q: add vddsoc/pu setpoint info

i.MX6Q needs to update vddarm, vddsoc/pu regulators when cpu freq
is changed, each setpoint has different voltage, so we need to
pass vddarm, vddsoc/pu's freq-voltage info from dts together.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 69171eda49ae from upstream]

9 years agoARM: dts: imx6q: update setting of VDDARM_CAP voltage
Anson Huang [Mon, 16 Dec 2013 21:07:37 +0000 (16:07 -0500)]
ARM: dts: imx6q: update setting of VDDARM_CAP voltage

According to datasheet, VDD_CACHE_CAP must not exceed VDDARM_CAP
by more than 200mV, as all of i.MX6Q boards' VDD_CACHE_CAP currently
are connected to VDDSOC_CAP, so we need to follow this rule by
increasing VDDARM_CAP's voltage.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[shawn.guo: cherry-pick commit 26ea58019eda from upstream]

9 years agoARM: imx: add shared gate clock support
Shawn Guo [Sat, 19 Apr 2014 02:58:22 +0000 (10:58 +0800)]
ARM: imx: add shared gate clock support

It's quite common on i.MX that one gate bit controls the gating of
multiple clocks, i.e. this is a shared gate.  The patch adds the
function imx_clk_gate2_shared() for such case.  The clocks controlled
by the same gate bits should call this function with a pointer to a
single share count variable, so that the gate bits will only be
operated on the first enabling and the last disabling of these shared
gate clocks.

Thanks to Gerhard Sittig <gsi@denx.de> for this idea.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit f9f28cdf2167 from upstream]

9 years agoARM: imx: lock is always valid for clk_gate2
Shawn Guo [Fri, 18 Apr 2014 08:07:44 +0000 (16:07 +0800)]
ARM: imx: lock is always valid for clk_gate2

The imx specific clk_gate2 always has a valid lock with the clock.  So
the validation on gate->lock is not really needed.  Remove it.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit 94b5c0288299 from upstream]

9 years agoARM: imx: define struct clk_gate2 on our own
Shawn Guo [Fri, 18 Apr 2014 07:55:16 +0000 (15:55 +0800)]
ARM: imx: define struct clk_gate2 on our own

The imx clk-gate2 driver implements an i.MX specific gate clock, which
has two bits controlling the gate states.  While this is a completely
separate gate driver from the common clk-gate one, it reuses the common
clk_gate structure.  Such reusing makes the extending of clk_gate2
clumsy.  Let's define struct clk_gate2 on our own to make the driver
independent of the common clk-gate one, and ease the clk_gate2 extending
at a later time.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit 54ee1471f820 from upstream]

9 years agoARM: i.MX6: ipu_di_sel clocks can set parent rates
Philipp Zabel [Mon, 14 Apr 2014 14:20:40 +0000 (16:20 +0200)]
ARM: i.MX6: ipu_di_sel clocks can set parent rates

To obtain exact pixel clocks, allow the DI clock selectors to influence
the PLLs that they are derived from.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit 4591b13289b5 from upstream]

9 years agoARM: imx6q-clk: parent lvds_gate from lvds_sel
Lucas Stach [Fri, 28 Mar 2014 16:52:52 +0000 (17:52 +0100)]
ARM: imx6q-clk: parent lvds_gate from lvds_sel

Allows fror proper refcounting of the parent clocks
when enabling the clock output on CLK1/2 pads.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit c2bece3cb121 from upstream]