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

From Texas Instruments Wiki
Jump to: navigation, search

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.

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]

Other Files[edit]

Enabling Driver Support[edit]

NOTE

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 GPIO

For Regulators

For testing and debugging, the status of these can be monitored from userspace with sysfs:

For GPIO

For Regulators

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.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TPS65086x Linux Driver here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TPS65086x Linux Driver here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article TPS65086x Linux Driver here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article TPS65086x Linux Driver here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article TPS65086x Linux Driver here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TPS65086x Linux Driver here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TPS65086x Linux Driver here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article TPS65086x Linux Driver here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article TPS65086x Linux Driver here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity