Linux Driver for TWL4030

(ACTIVE) TWL4030SW-LINUX

Description & Features

Technical Documents

Support & Training

Order Now



Description

The Linux driver supports the TWL4030 series of Integrated Power Management ICs. The Linux driver supports communication through the I2C bus and interfaces with various sub-systems.

 

Linux Mainline Status

Available in Linux Main line: Yes
Available through git.ti.com: N/A

Supported Devices:

  • twl4030
  • twl5030
  • twl5031
  • tps65950
  • tps65930
  • tps65920
  • tps65921
  • twl6030
  • twl6032

 

Linux Source Files

The files associated with this device are:

  1. drivers/gpio/gpio-twl4030.c
  2. drivers/hwmon/twl4030-madc-hwmon.c
  3. drivers/iio/adc/twl4030-madc.c
  4. drivers/input/keyboard/twl4030_keypad.c
  5. drivers/input/misc/twl4030-pwrbutton.c
  6. drivers/input/misc/twl4030-vibra.c
  7. drivers/mfd/twl-core.c
  8. drivers/mfd/twl4030-audio.c
  9. drivers/mfd/twl4030-irq.c
  10. drivers/mfd/twl4030-power.c
  11. drivers/phy/phy-twl4030-usb.c
  12. drivers/power/twl4030_charger.c
  13. drivers/power/twl4030_madc_battery.c
  14. drivers/pwm/pwm-twl-led.c
  15. drivers/pwm/pwm-twl.c
  16. drivers/regulator/twl-regulator.c
  17. drivers/rtc/rtc-twl.c
  18. drivers/usb/phy/phy-twl6030-usb.c
  19. drivers/watchdog/twl4030_wdt.c
  20. sound/soc/omap/omap-twl4030.c
  21. sound/soc/codecs/twl4030.c
  22. Documentation/devicetree/bindings/gpio/gpio-twl4030.txt
  23. Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt
  24. Documentation/devicetree/bindings/input/twl4030-keypad.txt
  25. Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt
  26. Documentation/devicetree/bindings/mfd/twl-familly.txt
  27. Documentation/devicetree/bindings/mfd/twl4030-audio.txt
  28. Documentation/devicetree/bindings/mfd/twl4030-power.txt
  29. Documentation/devicetree/bindings/power/twl-charger.txt
  30. Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
  31. Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
  32. Documentation/devicetree/bindings/regulator/twl-regulator.txt
  33. Documentation/devicetree/bindings/rtc/twl-rtc.txt
  34. Documentation/devicetree/bindings/sound/omap-twl4030.txt
  35. Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
  36. Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt
  37. Documentation/hwmon/twl4030-madc-hwmon
  38. Documentation/watchdog/watchdog-parameters.txt
  39. Documentation/ABI/testing/sysfs-platform-twl4030-usb
  40. arch/arm/boot/dts/twl4030.dtsi
  41. arch/arm/boot/dts/twl4030_omap3.dtsi
  42. arch/arm/boot/dts/twl6030.dtsi
  43. drivers/mfd/twl-core.h
  44. include/linux/i2c/twl.h
  45. include/linux/i2c/twl4030-madc.h
  46. include/linux/mfd/twl4030-audio.h
  47. include/linux/platform_data/omap-twl4030.h
  48. include/linux/power/twl4030_madc_battery.h

Source Files

drivers/gpio/gpio-twl4030.c
drivers/hwmon/twl4030-madc-hwmon.c
drivers/iio/adc/twl4030-madc.c
drivers/input/keyboard/twl4030_keypad.c
drivers/input/misc/twl4030-pwrbutton.c
drivers/input/misc/twl4030-vibra.c
drivers/mfd/twl-core.c
drivers/mfd/twl4030-audio.c
drivers/mfd/twl4030-irq.c
drivers/mfd/twl4030-power.c
drivers/phy/phy-twl4030-usb.c
drivers/power/twl4030_charger.c
drivers/power/twl4030_madc_battery.c
drivers/pwm/pwm-twl-led.c
drivers/pwm/pwm-twl.c
drivers/regulator/twl-regulator.c
drivers/rtc/rtc-twl.c
drivers/usb/phy/phy-twl6030-usb.c
drivers/watchdog/twl4030_wdt.c
sound/soc/omap/omap-twl4030.c
sound/soc/codecs/twl4030.c

Linux Device Tree Documenation

Documentation/devicetree/bindings/gpio/gpio-twl4030.txt
Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt
Documentation/devicetree/bindings/input/twl4030-keypad.txt
Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt
Documentation/devicetree/bindings/mfd/twl-familly.txt
Documentation/devicetree/bindings/mfd/twl4030-audio.txt
Documentation/devicetree/bindings/mfd/twl4030-power.txt
Documentation/devicetree/bindings/power/twl-charger.txt
Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
Documentation/devicetree/bindings/regulator/twl-regulator.txt
Documentation/devicetree/bindings/rtc/twl-rtc.txt
Documentation/devicetree/bindings/sound/omap-twl4030.txt
Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt

Other Files

Documentation/hwmon/twl4030-madc-hwmon
Documentation/watchdog/watchdog-parameters.txt
Documentation/ABI/testing/sysfs-platform-twl4030-usb
arch/arm/boot/dts/twl4030.dtsi
arch/arm/boot/dts/twl4030_omap3.dtsi
arch/arm/boot/dts/twl6030.dtsi
drivers/mfd/twl-core.h
include/linux/i2c/twl.h
include/linux/i2c/twl4030-madc.h
include/linux/mfd/twl4030-audio.h
include/linux/platform_data/omap-twl4030.h
include/linux/power/twl4030_madc_battery.h

 

Enabling Driver Support

Configure kernel with "make menuconfig" (alternatively use "make xconfig" or
"make nconfig")

Menuconfig Location

Symbol: GPIO_TWL4030 [=y]
Type  : tristate
Prompt: TWL4030, TWL5030, and TPS659x0 GPIOs
  Location:
    -> Device Drivers
      -> GPIO Support (GPIOLIB [=y])
        -> MFD GPIO expanders
  Defined at drivers/gpio/Kconfig:847
  Depends on: GPIOLIB [=y] && TWL4030_CORE [=y]

Symbol: SENSORS_TWL4030_MADC [=y]
Type  : tristate
Prompt: Texas Instruments TWL4030 MADC Hwmon
  Location:
    -> Device Drivers
      -> Hardware Monitoring support (HWMON [=y])
  Defined at drivers/hwmon/Kconfig:1528
  Depends on: HWMON [=y] && TWL4030_MADC [=y]

Symbol: TWL4030_MADC [=y]
Type  : tristate
Prompt: TWL4030 MADC (Monitoring A/D Converter)
  Location:
    -> Device Drivers
      -> Industrial I/O support (IIO [=y])
        -> Analog to digital converters
  Defined at drivers/iio/adc/Kconfig:337
  Depends on: IIO [=y] && TWL4030_CORE [=y]


Symbol: BATTERY_TWL4030_MADC [=y]
Type  : tristate
Prompt: TWL4030 MADC battery driver
  Location:
    -> Device Drivers
      -> Power supply class support (POWER_SUPPLY [=y])
  Defined at drivers/power/Kconfig:255
  Depends on: POWER_SUPPLY [=y] && TWL4030_MADC [=y]


Symbol: SENSORS_TWL4030_MADC [=y]
Type  : tristate
Prompt: Texas Instruments TWL4030 MADC Hwmon
  Location:
    -> Device Drivers
      -> Hardware Monitoring support (HWMON [=y])
  Defined at drivers/hwmon/Kconfig:1528
  Depends on: HWMON [=y] && TWL4030_MADC [=y]

Symbol: KEYBOARD_TWL4030 [=y]
Type  : tristate
Prompt: TI TWL4030/TWL5030/TPS659x0 keypad support
  Location:
    -> Device Drivers
      -> Input device support
        -> Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y])
          -> Keyboards (INPUT_KEYBOARD [=y])
  Defined at drivers/input/keyboard/Kconfig:654
  Depends on: !UML && INPUT [=y] && INPUT_KEYBOARD [=y] && TWL4030_CORE [=y]
  Selects: INPUT_MATRIXKMAP [=y]

Symbol: INPUT_TWL4030_PWRBUTTON [=y]
Type  : tristate
Prompt: TWL4030 Power button Driver
  Location:
    -> Device Drivers
      -> Input device support
        -> Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y])
          -> Miscellaneous devices (INPUT_MISC [=y])
  Defined at drivers/input/misc/Kconfig:462
  Depends on: !UML && INPUT [=y] && INPUT_MISC [=y] && TWL4030_CORE [=y]

Symbol: INPUT_TWL4030_VIBRA [=y]
Type  : tristate
Prompt: Support for TWL4030 Vibrator
  Location:
    -> Device Drivers
      -> Input device support
        -> Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y])
          -> Miscellaneous devices (INPUT_MISC [=y])
  Defined at drivers/input/misc/Kconfig:472
  Depends on: !UML && INPUT [=y] && INPUT_MISC [=y] && TWL4030_CORE [=y]
  Selects: MFD_TWL4030_AUDIO [=y] && INPUT_FF_MEMLESS [=y]

Symbol: TWL4030_CORE [=y]
Type  : boolean
Prompt: TI TWL4030/TWL5030/TWL6030/TPS659x0 Support
  Location:
    -> Device Drivers
      -> Multifunction device drivers
  Defined at drivers/mfd/Kconfig:1210
  Depends on: HAS_IOMEM [=y] && I2C [=y]=y
  Selects: IRQ_DOMAIN [=y] && REGMAP_I2C [=y]
  Selected by: ARCH_OMAP2PLUS_TYPICAL [=y] && (ARCH_MULTI_V6 [=y] || ARCH_MULTI_V7 [=y]) && ARCH_OMAP2PLUS [=y] && (ARCH_OMAP3 [=y] || ARCH_OMAP4 [=y])

Symbol: TWL4030_POWER [=y]
Type  : boolean
Prompt: TI TWL4030 power resources
  Location:
    -> Device Drivers
      -> Multifunction device drivers
        -> TI TWL4030/TWL5030/TWL6030/TPS659x0 Support (TWL4030_CORE [=y])
  Defined at drivers/mfd/Kconfig:1226
  Depends on: HAS_IOMEM [=y] && TWL4030_CORE [=y] && ARM [=y]
  Selected by: ARCH_OMAP2PLUS_TYPICAL [=y] && (ARCH_MULTI_V6 [=y] || ARCH_MULTI_V7 [=y]) && ARCH_OMAP2PLUS [=y] && (ARCH_OMAP3 [=y] || ARCH_OMAP4 [=y])

Symbol: MFD_TWL4030_AUDIO [=y]
Type  : boolean
Prompt: TI TWL4030 Audio
  Location:
    -> Device Drivers
      -> Multifunction device drivers
        -> TI TWL4030/TWL5030/TWL6030/TPS659x0 Support (TWL4030_CORE [=y])
  Defined at drivers/mfd/Kconfig:1239
  Depends on: HAS_IOMEM [=y] && TWL4030_CORE [=y]
  Selects: MFD_CORE [=y]
  Selected by: INPUT_TWL4030_VIBRA [=y] && !UML && INPUT [=y] && INPUT_MISC [=y] && TWL4030_CORE [=y] || SND_SOC_TWL4030 [=y] && SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=y]

Symbol: TWL4030_USB [=y]
Type  : tristate
Prompt: TWL4030 USB Transceiver Driver
  Location:
    -> Device Drivers
      -> PHY Subsystem
  Defined at drivers/phy/Kconfig:158
  Depends on: TWL4030_CORE [=y] && REGULATOR_TWL4030 [=y] && USB_MUSB_OMAP2PLUS [=y] && USB_SUPPORT [=y]
  Selects: GENERIC_PHY [=y] && USB_PHY [=y]

Symbol: BATTERY_TWL4030_MADC [=y]
Type  : tristate
Prompt: TWL4030 MADC battery driver
  Location:
    -> Device Drivers
      -> Power supply class support (POWER_SUPPLY [=y])
  Defined at drivers/power/Kconfig:255
  Depends on: POWER_SUPPLY [=y] && TWL4030_MADC [=y]

Symbol: CHARGER_TWL4030 [=y]
Type  : tristate
Prompt: OMAP TWL4030 BCI charger driver
  Location:
    -> Device Drivers
      -> Power supply class support (POWER_SUPPLY [=y])
  Defined at drivers/power/Kconfig:314
  Depends on: POWER_SUPPLY [=y] && TWL4030_CORE [=y]

Symbol: TWL4030_WATCHDOG [=y]
Type  : tristate
Prompt: TWL4030 Watchdog
  Location:
    -> Device Drivers
      -> Watchdog Timer Support (WATCHDOG [=y])
  Defined at drivers/watchdog/Kconfig:402
  Depends on: WATCHDOG [=y] && TWL4030_CORE [=y]
  Selects: WATCHDOG_CORE [=y]

Symbol: SND_SOC_TWL4030 [=y]
Type  : tristate
  Defined at sound/soc/codecs/Kconfig:690
  Depends on: SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=y]
  Selects: MFD_TWL4030_AUDIO [=y]
  Selected by: SND_OMAP_SOC_OMAP_TWL4030 [=y] && SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=y] && TWL4030_CORE [=y] && SND_OMAP_SOC [=y] || SND_OMAP_SOC_OMAP3_PANDORA [=y] && SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=y] && TWL4030_CORE [=y] && SND_OMAP_SOC [=y] && MACH_OMAP3_PANDORA [=y] || SND_SOC_ALL_CODECS [=y] && SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=y] && COMPILE_TEST [=y] && TWL4030_CORE [=y]

Symbol: SND_OMAP_SOC_OMAP_TWL4030 [=y]
Type  : tristate
Prompt: SoC Audio support for TI SoC based boards with twl4030 codec
  Location:
    -> Device Drivers
      -> Sound card support (SOUND [=y])
        -> Advanced Linux Sound Architecture (SND [=y])
          -> ALSA for SoC audio support (SND_SOC [=y])
  Defined at sound/soc/omap/Kconfig:86
  Depends on: SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=y] && TWL4030_CORE [=y] && SND_OMAP_SOC [=y]
  Selects: SND_OMAP_SOC_MCBSP [=y] && SND_SOC_TWL4030 [=y]

Fixes and Code Enhancements

 

If there are fixes and or code enhancements that need to be added to this
driver please either

1. Send the patches to the relevant Linux Kernel community as listed in the maintainers file located: Here

or

2.  Contact your TI representative.

 

TI Devices (6)

Part Number Name Product Family
TPS65920  Integrated Power Management IC (PMIC) with 3 DC/DC's, 4 LDO's, USB HS Transceiver  Power Management 
TPS65921  Integrated Power Management IC (PMIC) with 3 DC/DC's, 4 LDOs, USB HS Transceiver  Power Management 
TPS65930  Integrated Power Management IC (PMIC) with 3 DC/DC's, 4 LDO's, Audio Codec, USB HS Transceiver  Power Management 
TPS65950  Integrated Power Management IC (PMIC) with 3 DC/DCs, 11 LDOs, Audio Codec, USB HS Transceiver  Power Management 
TWL6030  Fully Integrated Power Management IC (PMIC) with Switch Mode Charger  Power Management 
TWL6032  Fully Integrated Power Management IC (PMIC) with Power Path and Battery Charger  Power Management 

Support & Training

TI E2E Community

As a member of  myTI you can join the TI E2E™ Community  where you can ask questions, share ideas and collaborate with fellow engineers and TI experts

Content is provided "AS IS" by the respective TI and Community contributors and does not constitute TI specifications. See  Terms of use.

Engage in the Community

Blogs

Wikis

Visit the TI Wiki