summaryrefslogtreecommitdiff
path: root/include/twl4030.h
Commit message (Collapse)AuthorAgeFilesLines
* power: make most tps drivers and the twl4030 driver compatible with DM_I2CJean-Jacques Hiblot2018-12-101-1/+5
| | | | | | | | | | | | | | | | | | Those driver are not DM drivers per se (not using the PMIC/regulator framework) and are using the legacy I2C API. Make them compatible with the DM_I2C API. This impacts the following drivers: - palmas (used by am57xx/dra7xx evms) - tps65218 (used by am43xx evms) - tps65217 and tps65910 (used by am335x evms and am335x boneblack vboot) - twl4030 (used by omap3_logicpd) - tps65217 (used by brppt1) - twl6030 Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* input: twl4030: Keypad scan and inputPaul Kocialkowski2015-08-121-0/+3
| | | | | | | | | | | This allows scanning the twl4030 keypad, storing the result in a 64-byte long matrix with the twl4030_keypad_scan function. Detecting a key at a given column and row is made easier with the twl4030_keypad_key function. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@konsulko.com>
* input: TWL4030 input support for power button, USB and chargerPaul Kocialkowski2015-08-121-0/+14
| | | | | | | This adds support for detecting a few inputs exported by the TWL4030. Currently-supported inputs are the power button, USB and charger presence. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* power: twl4030: Power off supportPaul Kocialkowski2015-08-121-8/+24
| | | | | | | | | | This adds support for powering off (the omap3 SoC) from the twl4030. This is especially useful when the kernel does not actually power off the device using this method but reboots and leaves it up to the bootloader to actually turn the power off. Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* twl4030: device-index-specific MMC power initializations, common ramp-up delayPaul Kocialkowski2014-12-041-1/+1
| | | | | | | | | 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 VMMC1 and VMMC2, in doubt. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com>
* twl4030: More voltages on VAUX2 and VAUX3Paul Kocialkowski2014-11-051-0/+2
| | | | Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* twl4030: VMMC2 3.2V enable on MMC initPaul Kocialkowski2014-10-311-0/+2
| | | | | | | | | This enables the VMMC2 LDO, which powers the MMC2 device. When the device starts from MMC2, this has already been enabled by the BootROM, but when starting from peripheral boot (USB, UART), it is not the case. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-14/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* twl4030: make twl4030_i2c_read_u8 prototype consistentNishanth Menon2013-05-101-1/+1
| | | | | | | | | | | | u-boot standard i2c read prototype is i2c_read(addr, reg, 1, &buf, 1) twl4030_i2c_read_u8(u8 addr, u8 *val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_read_u8(u8 addr, u8 reg, u8 *val) Signed-off-by: Nishanth Menon <nm@ti.com>
* twl4030: make twl4030_i2c_write_u8 prototype consistentNishanth Menon2013-05-101-1/+1
| | | | | | | | | | | | u-boot standard i2c register write prototype is i2c_reg_write(u8 addr, u8 reg, u8 val) twl4030_i2c_write_u8(u8 addr, u8 val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_write_u8(u8 addr, u8 reg, u8 val) Signed-off-by: Nishanth Menon <nm@ti.com>
* twl4030: add gpio register offsetsNikita Kiryanov2012-12-201-0/+44
| | | | | | | Add gpio register offsets for twl4030. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
* Add power bus message definitions in twl4030.hPali Rohár2012-10-301-0/+98
| | | | | | | * Code copied from linux kernel 3.0.0 from file include/linux/i2c/twl.h * commit 6523b148b44be38d89c2ee9865d34da30d9f5f1c Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* omap: TWL4030 Bump VMMC1 interface voltage from 3V to 3.15VAsh Charles2011-12-091-0/+1
| | | | | | | | | | | | MMC interfaces are specified to be 3.3V compatible with an operating voltage range of 3.1V to 3.5V for SD cards. This change affects hardware using TWL4030 (TPS6595x) PMICs and should improve the reliability when communicating with marginally-spec'd MMC devices. 3.15V is the highest possible level for this chip. This patch has been tested on a Gumstix Overo board. Signed-off-by: Ash Charles <ash@gumstix.com> Tested-by: Steve Sakoman <steve@sakoman.com>
* ARMV7: OMAP: add convenience function to set TWL4030 regulator voltagesSteve Sakoman2010-09-081-0/+14
| | | | | | | | | | | This patch adds a function to allow one to easily set the target voltage for the TWL4030 regulators. It also modifies the existing code to use this new function. Applicable definitions are moved out of the driver file and into the header file so that they are generally accessible Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* TWL4030: make LEDs selectable for twl4030_led_init()Grazvydas Ignotas2010-01-041-1/+5
| | | | | | | | | | | | Not all boards have both LEDs hooked, so enabling both on boards with single LED will just waste power. Make it possible to choose LEDs by adding argument to twl4030_led_init(). Using this turn on only LEDB for pandora, leave both LEDs on for all other boards, as it was before this patch. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
* TWL4030 Add usb PHY supportTom Rix2009-12-201-15/+128
| | | | | | | | | | The twl4030 provides a PHY device for connecting a link device, like musb, to physical connection. This change adds the twl4030 usb registers and functions for initializing the PHY as required by omap3. Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
* OMAP3 Move twl4030 mmc functionTom Rix2009-07-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | Because twl4030 now has its own device files, move and rename twl4030_mmc_config. twl4030_mmc_config initializes the twl4030 power setting to the mmc device. Because it is in the twl4030 power domain, move it out of drivers/mmc/omap3_mmc.c and into drivers/power/twl4030.c. The function was renamed to twl4030_power_mmc_init because all the functions in this file are to have the format twl4030_power_<device>_<action> In this case the suffix is mmc_init so device : mmc action : init Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Heiko Schocher <hs@denx.de>
* OMAP3 Move twl4030 power and led functionsTom Rix2009-07-291-2/+152
| | | | | | | | | | | | | | | | | | | | | | | | Because twl4030 now has its own device files, move exiting omap3 power_init_r to a new location. power_init_r is the only function in board/omap3/common. It initializes the twl4030 power for the board and enables the led. The power part of the the function is moved to twl4030_power_init in drivers/power/twl4030.c The power compilation is conditional on the existing config variable CONFIG_TWL4030_POWER. The led part is moved to twl4030_led_init in the new file drivers/misc/twl4030_led.c The led compilation is conditional on the new config variable CONFIG_TWL4030_LED The directory board/omap3/common was removed because power_init_r was the only function in it. Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Heiko Schocher <hs@denx.de>
* TWL4030 Add power reset buttonTom Rix2009-07-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Zoom2 power reset button is on the top right side of the main board. Press and hold for about to 8 seconds to completely reset the board. Some of the beta boards have a hardware problem that prevents using this feature. If is difficult to further characterize the boards that fail. So disable resetting for all beta boards. The Zoom1 reset button is the red circle on the top right, front of the board. Press and hold the button for 8 seconds to completely reset the board. After analyzing beagle, it was determined that other boards that use the twl4030 for power managment can also make use this function. The resetting is done by the power management part of the twl4030. Since there is no existing drivers/power, add one. The compilation of power/twl4030.h is controlled by the config variable CONFIG_TWL4030_POWER Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Heiko Schocher <hs@denx.de>
* TWL4030 Add initial supportTom Rix2009-07-281-0/+245
The TWL4030 supplies many peripherals for OMAP3 boards. These include power management, usb and, keyboard. The product description is found here: http://focus.ti.com/docs/prod/folders/print/tps65950.html Product reference document, tps65950.pdf, is found here: http://www.ti.com/lit/gpn/tps65950 Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Heiko Schocher <hs@denx.de>