1
0
Fork 0
Commit Graph

15 Commits (zero-gravitas)

Author SHA1 Message Date
Paul Kocialkowski 461484c27e input: TWL6030 input support for power button, USB and charger
This adds support for detecting a few inputs exported by the TWL6030.
Currently-supported inputs are the power button, USB and charger presence.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15 15:12:57 -04:00
Paul Kocialkowski d6a2042dbc power: twl6030: Power off support
This adds support for powering off (the omap SoC) from the twl6030.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15 15:12:56 -04:00
Paul Kocialkowski 6313c65004 power: twl6030: Clear VUSB_IN_PMID bit on USB device setup
When booting from USB, the bootrom sets the VUSB_IN_PMID bit of the MISC2
register of the TWL6030. However, U-Boot sets the VUSB_IN_VSYS bit to enable
VBUS input. As both bits are contradictory, enabling both disables the input,
according to the TWL6030 TRM.

Thus, we need to clear the VUSB_IN_PMID bit in case of an USB boot (which could
just as well be a memory boot after USB timed out).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15 15:12:51 -04:00
Paul Kocialkowski 0343f71f09 power: twl6030: Configure VUSB voltage on USB device setup
This explicitly sets VUSB voltage to 3.3V when enabling USB.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15 15:12:50 -04:00
Paul Kocialkowski a85362fb3e power: twl6030: Device-index-specific MMC power initialization
Not every device has multiple MMC slots available, so it makes sense to enable
only the required LDOs for the available slots. Generic code in omap_hsmmc will
enable both VMMC and VAUX1, in doubt.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15 15:10:51 -04:00
Paul Kocialkowski d7b6a75497 power: twl6030: Enable VAUX1 for eMMC power, depending on BOOT2 value
This enables the VAUX1 supply, used for eMMC power in standard configurations.
Its voltage is determined by the value of the BOOT2 pin of the TWL6030.

Note that the TWL6030 might already have enabled this regulator at startup
(depending on the value of the BOOT3 pin of the TWL6030), according to the
TWL6030 datasheet.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15 15:10:51 -04:00
Paul Kocialkowski c5dbae7c19 power: twl6030: Some more explicit registers and values definitions
This makes the twl6030 mmc and usb-related power registers and values
definitions more explicit and clear and adds prefixes to them.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15 15:10:50 -04:00
Oleg Kosheliev 340e6c8300 ARMV7: OMAP4: Add twl6032 support
Added chip type detection and twl6032
support in the battery control
and charge functions.

Based on Balaji T K <balajitk@ti.com> patches for TI u-boot.

Signed-off-by: Oleg Kosheliev <oleg.kosheliev@ti.com>
2013-12-04 08:11:28 -05:00
Oleg Kosheliev fc8895035b ARMV7: OMAP4: Add struct for twl603x data
The data struct is used to support different
PMIC chip types. It contains the chip type and
the data (e.g. registers addresses, adc multiplier)
which is different for twl6030 and twl6032.
Replaced some hardcoded values with the
structure vars.

Based on Balaji T K <balajitk@ti.com> patches for TI u-boot.

Signed-off-by: Oleg Kosheliev <oleg.kosheliev@ti.com>
2013-12-04 08:11:28 -05:00
Wolfgang Denk 1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Nishanth Menon 502dac5568 twl6030: add header guard
Add an header guard to common header file to prevent multiple includes
messing things up.

Signed-off-by: Nishanth Menon <nm@ti.com>
2013-05-10 08:25:54 -04:00
Nishanth Menon ebce10e5b2 twl6030: move twl6030 register access functions to common header file
twl6030_i2c_[read|write]_u8 can be used else where to access
multi-function device such as twl6030, so move the register access
functions to the common twl6030.h header file.

Signed-off-by: Nishanth Menon <nm@ti.com>
2013-05-10 08:25:54 -04:00
Balaji T K 14fa2dd00f mmc: omap: config VMMC, MMC1_PBIAS
Config VMMC voltage to 3V for MMC/SD card slot
and PBIAS settings needed for OMAP4
Fixes MMC/SD detection on boot from eMMC.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-09-30 22:00:55 +02:00
Balaji T K 3e664f6d50 ARMV7: OMAP4: twl6030 add battery charging support
Add battery charging support twl6030 driver.
Add support for battery voltage and current measurements.
Add command to get battery status and start/stop battery charging from USB.

Signed-off-by: Balaji T K <balajitk@ti.com>
Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-11 10:56:01 -05:00
Steve Sakoman 516799f677 ARMV7: Add support for the TWL6030 I2C power chip used in OMAP4 systems
This patch add the basic infrastructure for the TWL6030 driver and enables
support in the two existing OMAP4 boards, Panda and OMAP4430 SDP

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-08-05 10:11:30 -04:00