Skip to contentSkip to conversation

ARM: tegra: dalmore: add regulators

PATCH Superseded Laxman Dewangan 3 participants 9 messages Mar 20, 2013

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: tegra: dalmore: add regulators

This series add the regulators for Dalmore platform. Dalmore also have the Palma PMIC as primary PMIC but dt population will be send later once DT documentation finalize.

Laxman Dewangan (4):
ARM: tegra: enable Tegra114 based platform PMICs
ARM: tegra: dalmore: add cpu regulator's node
ARM: tegra: dalmore: add dt node for TPS65090's regulators
ARM: tegra: dalmore: add fixed regulator's node

 .../devicetree/bindings/regulator/tps65090.txt     |    4 +-
 arch/arm/boot/dts/tegra114-dalmore.dts             |  160 ++++++++++++++++++++
 arch/arm/configs/tegra_defconfig                   |    7 +
 3 files changed, 169 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/4 ARM: tegra: enable Tegra114 based platform PMICs

NVIDIA's Tegra114 have two reference platform, Dalmore and Pluto. Dalmore uses the following PMICs:
- TPS65913 as primary PMIC.
- TPS65090 as secondary PMIC used for switch regulators and battery charging.
- TPS51632 for cpu regulator.

Pluto uses the TPS65913 as the PMIC.

Enable config variable of these PMICs for Dalomore and Pluto.

---
 arch/arm/configs/tegra_defconfig |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/configs/tegra_defconfig +7 -0
index aba4881..34b9342 100644
@@ -126,6 +126,7 @@ CONFIG_SPI=y
 CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
 CONFIG_GPIO_PCA953X_IRQ=y
+CONFIG_GPIO_PALMAS=y
 CONFIG_GPIO_TPS6586X=y
 CONFIG_GPIO_TPS65910=y
 CONFIG_POWER_SUPPLY=y
@@ -136,12 +137,17 @@ CONFIG_SENSORS_LM90=y
 CONFIG_MFD_TPS6586X=y
 CONFIG_MFD_TPS65910=y
 CONFIG_MFD_MAX8907=y
+CONFIG_MFD_TPS65090=y
+CONFIG_MFD_PALMAS=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
 CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_MAX8907=y
+CONFIG_REGULATOR_PALMAS=y
+CONFIG_REGULATOR_TPS51632=y
 CONFIG_REGULATOR_TPS62360=y
+CONFIG_REGULATOR_TPS65090=y
 CONFIG_REGULATOR_TPS6586X=y
 CONFIG_REGULATOR_TPS65910=y
 CONFIG_MEDIA_SUPPORT=y
@@ -191,6 +197,7 @@ CONFIG_RTC_INTF_SYSFS=y
 CONFIG_RTC_INTF_PROC=y
 CONFIG_RTC_INTF_DEV=y
 CONFIG_RTC_DRV_MAX8907=y
+CONFIG_RTC_DRV_PALMAS=y
 CONFIG_RTC_DRV_TPS6586X=y
 CONFIG_RTC_DRV_TPS65910=y
 CONFIG_RTC_DRV_EM3027=y
Signature · 1 line
1.7.1.1
#2 lore raw

Re: [PATCH 1/4] ARM: tegra: enable Tegra114 based platform PMICs

Quoted 9 lines · Laxman Dewangan

NVIDIA's Tegra114 have two reference platform, Dalmore and Pluto. Dalmore uses the following PMICs:
- TPS65913 as primary PMIC.
- TPS65090 as secondary PMIC used for switch regulators and battery charging.
- TPS51632 for cpu regulator.

Pluto uses the TPS65913 as the PMIC.

Enable config variable of these PMICs for Dalomore and Pluto.

Just FYI, I would apply the DT changes to Tegra's for-3.10/dt branch, and the defconfig change to Tegra's for-3.10/defconfig branch. The /dt branch will get merged first, and the /defconfig after it. Hence, you would typically want to send patches in that order. It doesn't really make any practical difference in this case though.

#3 lore raw

PATCH 2/4 ARM: tegra: dalmore: add cpu regulator's node

In reply to Laxman Dewangan

Dalmore uses the TPS51632 as cpu regulator. This device is connected on I2C5.

Add dt node for this device.

---
 arch/arm/boot/dts/tegra114-dalmore.dts |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +15 -0
index a61974e..6be9434 100644
@@ -718,6 +718,21 @@
 		clock-frequency = <408000000>;
 	};
 
+	i2c at 7000d000 {
+		status = "okay";
+		clock-frequency = <400000>;
+
+		tps51632 {
+			compatible = "ti,tps51632";
+			reg = <0x43>;
+			regulator-name = "vdd-cpu";
+			regulator-min-microvolt = <500000>;
+			regulator-max-microvolt = <1520000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+	};
+
 	pmc {
 		nvidia,invert-interrupt;
 	};
Signature · 1 line
1.7.1.1
#4 lore raw

PATCH 3/4 ARM: tegra: dalmore: add dt node for TPS65090's regulators

In reply to Laxman Dewangan

NVIDIA's Tegra114 platform, Dalmore, uses the TPS65090 as secondary PMICs which mainly act as voltage switch controlled by I2C communication.

Add regulator node for this device.

---
 .../devicetree/bindings/regulator/tps65090.txt     |    4 +-
 arch/arm/boot/dts/tegra114-dalmore.dts             |   90 ++++++++++++++++++++
 2 files changed, 92 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/tps65090.txt +2 -2
index 313a60b..8926e2d 100644
@@ -41,8 +41,8 @@ Example:
 		infet5-supply = <&some_reg>;
 		infet6-supply = <&some_reg>;
 		infet7-supply = <&some_reg>;
-		vsys_l1-supply = <&some_reg>;
-		vsys_l2-supply = <&some_reg>;
+		vsys-l1-supply = <&some_reg>;
+		vsys-l2-supply = <&some_reg>;
 
 		regulators {
 			dcdc1 {
arch/arm/boot/dts/tegra114-dalmore.dts +90 -0

100 lines not on this page · raw message

Signature · 1 line
1.7.1.1
#5 lore raw

Re: [PATCH 3/4] ARM: tegra: dalmore: add dt node for TPS65090's regulators

Quoted 51 lines · Laxman Dewangan

NVIDIA's Tegra114 platform, Dalmore, uses the TPS65090 as secondary PMICs which mainly act as voltage switch controlled by I2C communication.

Add regulator node for this device.

---
 .../devicetree/bindings/regulator/tps65090.txt     |    4 +-
 arch/arm/boot/dts/tegra114-dalmore.dts             |   90 ++++++++++++++++++++
 2 files changed, 92 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/tps65090.txt +2 -2
index 313a60b..8926e2d 100644
@@ -41,8 +41,8 @@ Example:
 		infet5-supply = <&some_reg>;
 		infet6-supply = <&some_reg>;
 		infet7-supply = <&some_reg>;
-		vsys_l1-supply = <&some_reg>;
-		vsys_l2-supply = <&some_reg>;
+		vsys-l1-supply = <&some_reg>;
+		vsys-l2-supply = <&some_reg>;
 
 		regulators {
 			dcdc1 {
arch/arm/boot/dts/tegra114-dalmore.dts +16 -0
index 6be9434..a47c3d2 100644
@@ -731,6 +731,82 @@
 			regulator-boot-on;
 			regulator-always-on;
 		};
+
+		tps65090 at 48 {
+			compatible = "ti,tps65090";
+			reg = <0x48>;
+			interrupt-parent = <&gpio>;
+			interrupts = <72 0x04>; /* gpio PJ0 */
+
+			vsys1-supply = <&vdd_ac_bat_reg>;
+			vsys2-supply = <&vdd_ac_bat_reg>;
+			vsys3-supply = <&vdd_ac_bat_reg>;
+			infet1-supply = <&vdd_ac_bat_reg>;
+			infet2-supply = <&vdd_ac_bat_reg>;
+			infet3-supply = <&tps65090_dcdc2_reg>;
+			infet4-supply = <&tps65090_dcdc2_reg>;
+			infet5-supply = <&tps65090_dcdc2_reg>;
+			infet6-supply = <&tps65090_dcdc2_reg>;

arch/arm/boot/dts/tegra114-dalmore.dts line 759

Quoted 10 lines
arch/arm/boot/dts/tegra114-dalmore.dts +10 -0
+			infet7-supply = <&tps65090_dcdc2_reg>;
+			vsys-l1-supply = <&vdd_ac_bat_reg>;
+			vsys-l2-supply = <&vdd_ac_bat_reg>;
+
+			regulators {
+				dcdc1 {
+					regulator-name = "vdd-sys-5v0";
+					regulator-always-on;
+					regulator-boot-on;
+				};

You should also add the tps65090_dcdc1_reg label to dcdc1. I believe you make use of it in patch 4 and this currently causes build breaks.

arch/arm/boot/dts/tegra114-dalmore.dts line 811

Quoted 8 lines
arch/arm/boot/dts/tegra114-dalmore.dts +7 -0
+
+				tps65090_dcdc2_reg: dcdc2 {
+					regulator-name = "vdd-sys-3v3";
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
 

-rhyland

Signature · 1 line
nvpublic
#6 lore raw

Re: [PATCH 3/4] ARM: tegra: dalmore: add dt node for TPS65090's regulators

Quoted 10 lines · Rhyland Klein

On 3/20/2013 9:44 AM, Laxman Dewangan wrote:

arch/arm/boot/dts/tegra114-dalmore.dts +6 -0
+			regulators {
+				dcdc1 {
+					regulator-name = "vdd-sys-5v0";
+					regulator-always-on;
+					regulator-boot-on;
+				};

You should also add the tps65090_dcdc1_reg label to dcdc1. I believe you make use of it in patch 4 and this currently causes build breaks.

Actually patch 4 uses this label and I should add on patch 4, not on patch 3.

I removed from patch3 and when cherrypick the patch 4 from different branch to make the patches, I missed the change and hence patch 4 is not getting compiled.

I will fix the issue on next revision.

Sorry for messing up and thins for pointing this.

#7 lore raw

Re: [PATCH 3/4] ARM: tegra: dalmore: add dt node for TPS65090's regulators

In reply to Laxman Dewangan

arch/arm/boot/dts/tegra114-dalmore.dts line 828

Quoted 13 lines · Laxman Dewangan

NVIDIA's Tegra114 platform, Dalmore, uses the TPS65090 as secondary PMICs which mainly act as voltage switch controlled by I2C communication.

arch/arm/boot/dts/tegra114-dalmore.dts +3 -0
@@ -747,4 +823,18 @@
 		bus-width = <8>;
 		status = "okay";
 	};
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;

You need a blank line between the nodes there.

There a a number of typos and capitalization issues in the various commit descriptions.

#8 lore raw

PATCH 4/4 ARM: tegra: dalmore: add fixed regulator's node

In reply to Laxman Dewangan

NVIDIA's Tegra114 platform Dalmore has some voltage switches which are controlled by the Tegra GPIOs.

Add dt node for such fixed regulators.

---
 arch/arm/boot/dts/tegra114-dalmore.dts |   55 ++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +55 -0
index a47c3d2..86116f1 100644
@@ -836,5 +836,60 @@
 			regulator-max-microvolt = <5000000>;
 			regulator-always-on;
 		};
+
+		dvdd_ts_reg: regulator at 1 {
+			compatible = "regulator-fixed";
+			reg = <1>;
+			regulator-name = "dvdd_ts";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			enable-active-high;
+			gpio = <&gpio 61 0>; /* GPIO PH5 */
+		};
+
+		lcd_bl_en_reg: regulator at 2 {
+			compatible = "regulator-fixed";
+			reg = <2>;
+			regulator-name = "lcd_bl_en";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			gpio = <&gpio 58 0>; /* GPIO PH2 */
+		};
+
+		usb1_vbus_reg: regulator at 3 {
+			compatible = "regulator-fixed";
+			reg = <3>;
+			regulator-name = "usb1_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			gpio = <&gpio 108 0>; /* GPIO PN4 */
+			gpio-open-drain;
+			vin-supply = <&tps65090_dcdc1_reg>;
+		};
+
+		usb3_vbus_reg: regulator at 4 {
+			compatible = "regulator-fixed";
+			reg = <4>;
+			regulator-name = "usb2_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			gpio = <&gpio 86 0>; /* GPIO PK6 */
+			gpio-open-drain;
+			vin-supply = <&tps65090_dcdc1_reg>;
+		};
+
+		vdd_hdmi_reg: regulator at 5 {
+			compatible = "regulator-fixed";
+			reg = <5>;
+			regulator-name = "vdd_hdmi_5v0";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			gpio = <&gpio 81 0>; /* GPIO PK1 */
+			vin-supply = <&tps65090_dcdc1_reg>;
+		};
 	};
 };
Signature · 1 line
1.7.1.1