UPSTREAM: ARM: tegra: add SPI nodes to Tegra114 DT

NVIDIA's Tegra114 has 6 SPI controllers. These controllers are
redesign on T114 with different register interface.

Add DT entry for spi controllers and make it compatible with
"nvidia,tegra114-spi", since they are a new incompatible design.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
[swarren: fixed reg property for 3rd SPI controller]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 7ac751016748f50e78f8fb211172202db7c2f7b1)
(cherry-picked from
        git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: Define Tegra114 CAR binding

The device tree binding models Tegra114 CAR (Clock And Reset) as a single
monolithic clock provider.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 16d50f4da4123c04ef9ee2097668a80268147b37)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: dt: Add references to tegra_car clocks

Add references to tegra_car clocks for the basic device nodes. Also remove
the clock-frequency property of the serial node as the UART driver can now
use the clock framework to obtain the frequency.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 672d889c0a8969e8cc63d62c28b7073ae1370471)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: remove clock-frequency properties from serial nodes

Currently, the serial nodes define both a clock-frequency and a clocks
property. We should not provide both, since they might conflict.

In practice, this also causes problems since the of_serial driver uses
the clock-frequency property in preference to the clocks property, and
hence doesn't clk_prepare_enable() the clock, which may then leave it
with no known users, and hence the common clock framework will disable
it, thus breaking the port, which is usually the console.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 8364f5d96509e206f02a74bbdc2d4e3742cdefe4)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
(cherry picked from commit 61cbac243a1720be0f99c7a9199a69133de74abb)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: dts: tegra: fix the activate polarity of cd-gpio in mmc host

The GPIO pin of SD slot card detection should active low.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit bee14c5f8b85d2d351141b366699d3d9ae9a477b)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: Add sbs-battery node to Dalmore

This patch adds the node for the bq20z45 I2C gas gauge which is
compatible with the sbs-battery power supply driver.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
[swarren: remove unit-address from node name since it's unique already]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit b994e81eac293c71dab31cc4aa2d1f18050107d4)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: dalmore: add cpu regulator node

Dalmore uses the TPS51632 as CPU regulator. The device is connected
on I2C5.

Add DT node for TPS51632.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 83a8bc1931bd289f1466545cd5791ccef16c783e)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: dalmore: add TPS65090 node

NVIDIA's Tegra114 reference platform, Dalmore, uses the TPS65090 as
secondary PMICs which is mainly act as voltage switch regulator
controlled by i2c communication.

Add DT node for TPS65090.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
[swarren: remove unit-address from node name since it's unique already]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 0baa5d16451a1bbabf017a116f702b440f1dbc62)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: dalmore: add fixed regulator node

NVIDIA's Tegra114 reference platform Dalmore has voltage switch
regulators which are controlled by the Tegra GPIOs.

Add DT node for fixed regulators.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 4ec56d051124f73f66f6930cf1549f1c152ea67c)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: power_supply: Add OF bindings documentation for tps65090-charger

This change adds the binding documentation for the tps65090-charger.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
(cherry picked from commit 78f7bcedf8ba70027e0f9f94ec420998a273a95c)
(cherry-picked from git://git.infradead.org/battery-2.6.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: add DT binding for i2c-tegra

Add documentation for device tree binding of NVIDIA's Tegra I2C
controller driver.

Describing all compatible values used for different Tegra SoCs
in details in this documentation.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
[swarren: fixed a couple typos, trimmed examples]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 79b08be32fa6806a2724c5e495a17c257984d9d5)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: keep power on to SD slot on Dalmore

Set "regulator-always-on" for the SD slot on Dalmore, so that SD cards
work. This used to work, since this regulator is on by default, but was
broken by commit "ARM: tegra: dalmore: add TPS65090 node", since that
didn't specify always-on for this regulator.

In the long run, the regulators should all be hooked up to the SDHCI
device nodes. However, we haven't done that for any of the Tegra boards
yet, so to be consistent, this patch simply forces the regulator on,
rather than hooking it up and making it work differently to other boards.

Reported-by: Rhyland Klein <rklein@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 15d5ef4d9a1f6fd7bcf706e41f13d5029a91760f)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: add non-removable and keep-power-in-suspend property for MMC

This patch adds "non-removable" property of MMC host where the eMMC device
is for Tegra platform.

And the "keep-power-in-suspend" property was used for the SDIO device that
need this to go into suspend mode (e.g. BRCM43xx series).

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 7a2617a64dac0ce559bee0710704aa7d51f4e92a)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: add clock source of PMC to device trees

Adding the bindings of the clock source of PMC in DT.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 7021d1220584ab1e6efd3d59da47b65674d9896a)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: add power gpio keys to DT

This adds the power gpio key to DT and enable the wakeup of the gpio key
for the device. The Seaboard and paz00 already had the power gpio key
binding and the power key of Whistler was on KBC. So these boards' device
tree didn't include in this patch.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 5741a2560afa66dce9e53752888241310d8e7c93)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: whistler: add wakeup source for KBC

Adding KBC as a wakeup source for Whistler board.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 9be1e13e6e53048cce6135c823226f1198ee1725)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: dts: tegra: add the PM configurations of PMC

Adding the PM configuration of PMC when the platform support suspend
function.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit a44a019d45820eaeeb449450caa9e43f1f00a09b)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: tegra: fix the PMC compatible string in DT

The PMC HW is not 100% compatible across all Tegra series. We need to
specify them in DT.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit f45a7ce3ebee035a3e7b8a4d4cbb3ba4dfe56888)
(cherry-picked from:
	git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: ARM: dt: tegra: add bindings of power management configurations for PMC

The PMC mostly controls the entry and exit of the system from different
sleep modes. Different platform or system may have different configurations.
The power management configurations of PMC is represented as some properties.
The system needs to define the properties when the system supports deep sleep
mode (i.e. suspend).

Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(cherry picked from commit 4b51ccbc469facb7b589a71c2a4ae47d3e425d02)
(info split out Documentation change from the pmc driver changes)
Signed-off-by: Olof Johansson <olofj@chromium.org>
UPSTREAM: tps65090: Update bindings for subnode

This updates the DT documentation to reflect that the tps65090-charger
should be represented as a child node of the tps65090 device itself.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
(cherry picked from commit 6b24c9cb7d57a41f2ff193bcfcc2e1976bb4bbac)
Signed-off-by: Olof Johansson <olofj@chromium.org>