ARM: dts: Add omap3-beagle.dts

Add a minimal dts for original OMAP3430/3530 version of the Beagle board. This
version of the Beagle board has 256MB of DDR and features the same TWL4030
power management IC (PMIC) as the Beagle board XM.

Given that the Beagle and Beagle-XM boards use the same PMIC, move the
definition of the VSIM regulator into the TWL4030.dtsi file so that we do not
need to duplicate in the Beagle board dts file.

This has been boot tested on an OMAP3530 Beagle board and verifing that the
SD/MMC interface is working with a SD card.

V2 changes
- Rebased upon of devel-dt
- Corrected copyright date in omap3-beagle.dts file
- Added LED support after verifing that Beagle and Beagle XM have the same LED
  configuration

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: AM33XX: Add device tree OPP table

Add DT OPP table for AM33XX family of devices. This data is
decoded by OF with of_init_opp_table() helper function.

Also adds cpu0 supply name to the corresponding dts files.
cpu0-supply name is used by cpufreq-cpu0 driver to get the
regulator pointer for voltage modifications.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: AM33XX: Add basic pinctrl device tree data

Adds basic pinctrl device tree data for AM33XX family of devices.
This patch is based on the pinctrl-single driver.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: AM33XX: Add D_CAN device tree data

Add Bosch D_CAN controller device tree data to AM33XX dtsi
file by adding d_can device nodes with all the necessary
parameters.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: AM33XX: Add lis331dlh device tree data to am335x-evm

Add lis331dlh device tree data to am335x-evm.dts. In AM335x EVM
lis331dlh accelerometer is connected to I2C2 bus. So this patch
change the status of I2C2 node to "okay" to use I2C2 bus. Also
added all the required platform data to am335x-evm.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: AM33XX: Add temperature sensor device tree data to am335x-evm

Add temperature sensor DT data to am335x-evm.dts. In AM335x EVM
tmp275 temperature sensor is connected to I2C2 bus. So this patch
adds child node inside i2c2 node with i2c slave address. This patch
is tested on AM335x EVM.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: AM33XX: Add tsl2550 ambient light sensor DT data

Add tsl2550 ambient light sensor DT data to am335x-evm.dts. In AM335x
EVM tsl2550 ambient light sensor is connected to I2C2 bus. So this patch
adds child node inside i2c2 node with i2c slave address.

TAOS tsl2550 sensor with two-wire SMBus serial interface. This patch
also reduces I2C2 clock frequency to 100KHz from 400KHz because the
maximum clock frequency of SMBus is 100KHz.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
ARM: dts: Add am335x-evmsk.dts

Add AM335X EVM-SK device tree source (am335x-sk.dts) file to use
the am33xx.dtsi SoC file, along with the memory node information.

Also adds support for tps65910 regulator and lis331dlh accelerometer.
Following drivers/functionality were tested on AM335x-EVM-SK.
* I2C
* TPS65910 regulators
* lis331dlh accelerometer

AM335x EVM Starter Kit details can be accessed from:
http://www.ti.com/tool/tmdssk3358

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Documentation: dt: i2c: Update trivial-devices list

Update i2c trivial-devices list by adding the description for
ti,tmp275 temperature sensor and taos,tsl2550 ambient light
sensor.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
ARM: dts: Add twl6030-usb data

Add twl6030-usb data node in twl6030 device tree file. twl6030-usb is the
comparator driver for USB that detects VBUS and ID events. The dt data is
comprised of two interrupts, one for ID and one for VBUS and a phandle to the
regulator.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: Add twl4030-usb data

Add twl4030-usb data node in twl4030 device tree file. twl4030-usb is the phy
driver for MUSB used in omap3 chipsets. The dt data is comprised of two
interrupts, one for ID and one for VBUS and three phandles to regulator.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: OMAP4: add *reg* property for ocp2scp

*reg* property for ocp2scp was previously obtained from ti,hwmods property.
But that is now explicitly added to the dt node.
Also updated the documentation with *reg* info.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
ARM: dts: OMAP: Move interrupt-parent to the root node to avoid duplication

The interrupt-parent attribute does not have to be added in each
node since the fmwk will check for the parent as well to get it.

Create an interrupt-parent for OMAP2, OMAP3, AM33xx and remove the
attributes from every nodes that were using it.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Sebastien Guiriec <s-guiriec@ti.com>
ARM: dts: OMAP: Add timer nodes

Add the 12 GP timers nodes present in OMAP2.
Add the 12 GP timers nodes present in OMAP3.
Add the 11 GP timers nodes present in OMAP4.
Add the 7 GP timers nodes present in AM33xx.

Add documentation for timer properties specific to OMAP.

Thanks to Vaibhav Hiremath for creating the AM33xx timer nodes. I have modified
Vaibhav's original nodes adding information on which timers support a PWM
output.

V5 changes:
- Updated timer register sizes for OMAP2/3/4.
- Modified AM335x timer register size to be 1KB instead of 4KB to align with
  HWMOD.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: dts: omap5: Update GPIO with address space and interrupts

Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
ARM: dts: omap5: Update I2C with address space and interrupts

Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
ARM: dts: omap5: Update UART with address space and interrupts

Add base address and interrupt line inside Device Tree data for
OMAP5.

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
ARM: dts: omap5: Update MMC with address space and interrupts

Add base address and interrupt line inside Device Tree data for
OMAP5.

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
ARM: OMAP3: Dynamically disable secure timer nodes for secure devices

OMAP3 devices may or may not have security features enabled. Security enabled
devices are known as high-secure (HS) and devices without security are known as
general purpose (GP).

For OMAP3 devices there are 12 general purpose timers available. On secure
devices the 12th timer is reserved for secure usage and so cannot be used by
the kernel, where as for a GP device it is available. We can detect the OMAP
device type, secure or GP, at runtime via an on-chip register. Today, when not
using DT, we do not register the 12th timer as a linux device if the device is
secure.

When using device tree, device tree is going to register all the timer devices
it finds in the device tree blob. To prevent device tree from registering 12th
timer on a secure OMAP3 device we can add a status property to the timer
binding with the value "disabled" at boot time. Note that timer 12 on a OMAP3
device has a property "ti,timer-secure" to indicate that it will not be
available on a secure device and so for secure OMAP3 devices, we search for
timers with this property and then disable them. Using the prom_add_property()
function to dynamically add a property was a recommended approach suggested by
Rob Herring [1].

I have tested this on an OMAP3 GP device and faking it to pretend to be a
secure device to ensure that any timers marked with "ti,timer-secure" are not
registered on boot. I have also made sure that all timers are registered as
expected on a GP device by default.

[1] http://comments.gmane.org/gmane.linux.ports.arm.omap/79203

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
ARM: OMAP: Add function to request a timer by capability

Currently OMAP timers can be requested by requesting any available or by a
numerical device ID. If a specific timer is required because it has a particular
capability, such as can interrupt the on-chip DSP in addition to the ARM CPU,
then the user needs to know the device ID of the timer with this feature.
Therefore, add a new API called omap_dm_timer_request_by_cap() that allows
drivers to request a timer by capability.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>