NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
TPS65086x Linux Driver
The Linux driver supports the TPS65086 Power Management IC. The Linux driver supports communication through the I2C bus and interfaces with the Regulator sub-system.
Contents
Linux Mainline Status[edit]
Available in Linux Main line: Yes
Available through git.ti.com: N/A
Supported Devices[edit]
- tps65086
Linux Source Files[edit]
Source Files[edit]
Device Tree Documenation[edit]
- Documentation/devicetree/bindings/mfd/tps65086.txt
- Documentation/devicetree/bindings/gpio/gpio-tps65086.txt
Other Files[edit]
Enabling Driver Support[edit]
Configure kernel with "make menuconfig" (alternatively use "make xconfig" or "make nconfig")
Menuconfig Location[edit]
Symbol: MFD_TPS65086 [=y] Type : tristate Prompt: TI TPS65086 Power Management Integrated Chips (PMICs) Location: -> Device Drivers -> Multifunction device drivers Defined at drivers/mfd/Kconfig:1109 Depends on: HAS_IOMEM [=y] && I2C [=y] Selects: REGMAP [=y] && REGMAP_IRQ [=y] && REGMAP_I2C [=y] Symbol: REGULATOR_TPS65086 [=y] Type : tristate Prompt: TI TPS65086 Power regulators Location: -> Device Drivers -> Voltage and Current Regulator Support (REGULATOR [=y]) Defined at drivers/regulator/Kconfig:684 Depends on: REGULATOR [=y] && MFD_TPS65086 [=y] Symbol: GPIO_TPS65086 [=y] Type : tristate Prompt: TI TPS65086 GPO Location: -> Device Drivers -> GPIO Support (GPIOLIB [=y]) -> MFD GPIO expanders Defined at drivers/gpio/Kconfig:849 Depends on: GPIOLIB [=y] && MFD_TPS65086 [=y]
Enable the above config options to build the kernel with support for this device.
Instantiation and Use[edit]
After the above step Linux will know how to interface with TPS65086x PMIC's, but not how, or even if, any are connected to the system. The modern recommended method for providing this to information to Linux is with Device Tree (DT). For example on a BeagleBone Black (BBB) we add the following information to the BBB's DT:
&i2c2_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_ctsn.i2c2_sda */ AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_rtsn.i2c2_scl */ AM33XX_IOPAD(0x878, PIN_INPUT | MUX_MODE7) /* gpio1_28 */ >; }; &i2c2 { pmic@5e { compatible = "ti,tps65086"; reg = <0x5e>; interrupt-parent = <&gpio1>; interrupts = <28 IRQ_TYPE_LEVEL_LOW>; interrupt-controller; #interrupt-cells = <2>; gpio-controller; #gpio-cells = <2>; regulators { buck1 { regulator-name = "vcc1"; regulator-min-microvolt = <1600000>; regulator-max-microvolt = <1600000>; regulator-boot-on; ti,regulator-decay; ti,regulator-step-size-25mv; }; }; }; };
The above defines how both the I2C and interrupt controller should be muxed out to get to our attached TPS65086x. We also define the default state of one of the BUCK regulators. From here we can then further describe devices attached to the regulators or GPIO pins provided by this part. Documentation on this can be found at the bottom of these pages:
For testing and debugging, the status of these can be monitored from userspace with sysfs:
Fixes and Code Enhancements[edit]
TIP
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.