Add support for PMICs used on Tegra 3 devices
cover Add support for PMICs used on Tegra 3 devices
Patch set adds basic support for PMICs used in many Tegra 3 devices. All PMIC drivers are based on datasheets provided by vendors. Implemented API include regulator set/get voltage enable/disable and basic PMIC r/w capabilities.
Drivers were tested by me on LG P895 (max77663), HTC One X (TPS80032) and ASUS TF300T (tps65911). Calculations and behavior were correct, predictable and reproducible.
Svyatoslav Ryhel (6):
power: pmic: add the base max77663 pmic support
power: regulator: max77663: add regulator support
power: pmic: add the base TPS80031 PMIC support
power: regulator: tps80031: add regulator support
power: pmic: tps65910: add TPS65911 PMIC support
power: regulator: tps65911: add regulator support
doc/device-tree-bindings/pmic/max77663.txt | 84 +++++ doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++ doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++ drivers/power/pmic/Kconfig | 12 + drivers/power/pmic/Makefile | 2 + drivers/power/pmic/max77663.c | 81 ++++ drivers/power/pmic/pmic_tps65910_dm.c | 26 +- drivers/power/pmic/tps80031.c | 82 ++++ drivers/power/regulator/Kconfig | 24 ++ drivers/power/regulator/Makefile | 3 + drivers/power/regulator/max77663_regulator.c | 362 ++++++++++++++++++ drivers/power/regulator/tps65911_regulator.c | 375 +++++++++++++++++++ drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++ include/power/max77663.h | 40 ++ include/power/tps65910_pmic.h | 47 +++ include/power/tps80031.h | 42 +++ 16 files changed, 1627 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 drivers/power/regulator/max77663_regulator.c create mode 100644 drivers/power/regulator/tps65911_regulator.c create mode 100644 drivers/power/regulator/tps80031_regulator.c create mode 100644 include/power/max77663.h create mode 100644 include/power/tps80031.h
Signature · 1 line
2.39.2
PATCH 1/6 power: pmic: add the base max77663 pmic support
Add support to bind the regulators/child nodes with the pmic. Also adds the pmic i2c based read/write functions to access pmic registers.
--- doc/device-tree-bindings/pmic/max77663.txt | 84 ++++++++++++++++++++++ drivers/power/pmic/Kconfig | 6 ++ drivers/power/pmic/Makefile | 1 + drivers/power/pmic/max77663.c | 81 +++++++++++++++++++++ include/power/max77663.h | 40 +++++++++++ 5 files changed, 212 insertions(+) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 include/power/max77663.h
doc/device-tree-bindings/pmic/max77663.txt new file +84 -0
@@ -0,0 +1,84 @@ +MAXIM, MAX77663 PMIC + +This device uses two drivers: +- drivers/power/pmic/max77663.c (for parent device) +- drivers/power/regulator/max77663_regulator.c (for child regulators) + +This chapter describes the binding info for the PMIC driver and regulators. + +Required properties for PMIC: +- compatible: "maxim,max77663" +- reg: usually 0x1c or 0x3c + +With those two properties, the pmic device can be used for read/write only. +To bind each regulator, the optional regulators subnode should exists. + +Optional subnode: +- name: regulators (subnode list of each device's regulator) + +Regulators subnode contains set on supported regulators. + +Required properties: +- regulator-name: used for regulator uclass platform data '.name', + +List of supported regulator nodes names for max77663: +- sd0, sd1, sd2, sd3, ldo0, ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7, ldo8 + +Optional: +- regulator-min-microvolt: minimum allowed Voltage to set +- regulator-max-microvolt: minimum allowed Voltage to set +- regulator-always-on: regulator should be never disabled +- regulator-boot-on: regulator should be enabled by the bootloader + +Linux driver binding for this driver is compatible. + +Example: + +max77663@1c { + compatible = "maxim,max77663"; + reg = <0x1c>; + + regulators { + sd0 { + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1250000>; + regulator-always-on; + regulator-boot-on; + }; + + ... + + ldo0 { + regulator-name = "avdd_pll"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + ... + + ldo2 { + regulator-name = "avdd_usb"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + ldo3 { + regulator-name = "vdd_sdmmc3"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + }; + + ... + + ldo8 { + regulator-name = "avdd_dsi_csi"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + }; +};
drivers/power/pmic/Kconfig +6 -0
@@ -184,6 +184,12 @@ config SPL_DM_PMIC_PFUZE100 This config enables implementation of driver-model pmic uclass features for PMIC PFUZE100 in SPL. The driver implements read/write operations. +config DM_PMIC_MAX77663 + bool "Enable Driver Model for PMIC MAX77663" + ---help--- + This config enables implementation of driver-model pmic uclass features + for PMIC MAX77663. The driver implements read/write operations. + config DM_PMIC_MAX77686 bool "Enable Driver Model for PMIC MAX77686" ---help---
drivers/power/pmic/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-$(CONFIG_$(SPL_TPL_)DM_PMIC) += pmic-uclass.o obj-$(CONFIG_$(SPL_)DM_PMIC_FAN53555) += fan53555.o obj-$(CONFIG_$(SPL_)DM_PMIC_DA9063) += da9063.o +obj-$(CONFIG_$(SPL_)DM_PMIC_MAX77663) += max77663.o obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o obj-$(CONFIG_DM_PMIC_MAX8998) += max8998.o obj-$(CONFIG_DM_PMIC_MC34708) += mc34708.o
drivers/power/pmic/max77663.c new file +81 -0
81 lines not on this page · raw message
include/power/max77663.h new file +40 -0
@@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright(C) 2023 Svyatoslav Ryhel <[email protected]> +*/ + +#ifndef _MAX77663_H_ +#define _MAX77663_H_ + +#define MAX77663_LDO_NUM 9 +#define MAX77663_SD_NUM 5 + +/* Drivers name */ +#define MAX77663_LDO_DRIVER "max77663_ldo" +#define MAX77663_SD_DRIVER "max77663_sd" + +#define MAX77663_SD_STATUS_MASK 0x30 + +#define MAX77663_SD0_VOLT_MAX_HEX 0x40 +#define MAX77663_SD1_VOLT_MAX_HEX 0X4C +#define MAX77663_SD_VOLT_MAX_HEX 0XFF +#define MAX77663_SD_VOLT_MIN_HEX 0x02 + +#define MAX77663_SD0_VOLT_MAX 1400000 +#define MAX77663_SD1_VOLT_MAX 1550000 +#define MAX77663_SD_VOLT_MAX 3787500 +#define MAX77663_SD_VOLT_MIN 625000 + +#define MAX77663_SD_VOLT_BASE 600000 + +#define MAX77663_LDO_STATUS_MASK 0xC0 +#define MAX77663_LDO_VOLT_MASK 0x3F +#define MAX77663_LDO_VOLT_MAX_HEX 0x3F + +#define MAX77663_LDO01_VOLT_MAX 2375000 +#define MAX77663_LDO4_VOLT_MAX 1587500 +#define MAX77663_LDO_VOLT_MAX 3950000 + +#define MAX77663_LDO_VOLT_BASE 800000 + +#endif /* _MAX77663_H_ */
Signature · 1 line
2.39.2
PATCH 2/6 power: regulator: max77663: add regulator support
In reply to Svyatoslav RyhelThe driver provides regulator set/get voltage enable/disable functions for MAXIM MAX77663 PMICs.
--- drivers/power/regulator/Kconfig | 8 + drivers/power/regulator/Makefile | 1 + drivers/power/regulator/max77663_regulator.c | 362 +++++++++++++++++++ 3 files changed, 371 insertions(+) create mode 100644 drivers/power/regulator/max77663_regulator.c
drivers/power/regulator/Kconfig +8 -0
@@ -141,6 +141,14 @@ config SPL_REGULATOR_PWM This config enables implementation of driver-model regulator uclass features for PWM regulators in SPL. +config DM_REGULATOR_MAX77663 + bool "Enable Driver Model for REGULATOR MAX77663" + depends on DM_REGULATOR && DM_PMIC_MAX77663 + ---help--- + This config enables implementation of driver-model regulator uclass + features for REGULATOR MAX77663. The driver implements get/set api for: + value and enable. + config DM_REGULATOR_MAX77686 bool "Enable Driver Model for REGULATOR MAX77686" depends on DM_REGULATOR && DM_PMIC_MAX77686
drivers/power/regulator/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_REGULATOR_AS3722) += as3722_regulator.o obj-$(CONFIG_$(SPL_)REGULATOR_AXP) += axp_regulator.o obj-$(CONFIG_$(SPL_)REGULATOR_AXP_USB_POWER) += axp_usb_power.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_DA9063) += da9063.o +obj-$(CONFIG_$(SPL_)DM_REGULATOR_MAX77663) += max77663_regulator.o obj-$(CONFIG_DM_REGULATOR_MAX77686) += max77686.o obj-$(CONFIG_DM_REGULATOR_NPCM8XX) += npcm8xx_regulator.o obj-$(CONFIG_$(SPL_)DM_PMIC_PFUZE100) += pfuze100.o
drivers/power/regulator/max77663_regulator.c new file +362 -0
362 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 3/6 power: pmic: add the base TPS80031 PMIC support
In reply to Svyatoslav RyhelAdd support to bind the regulators/child nodes with the pmic. Also adds the pmic i2c based read/write functions to access pmic registers.
--- doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++++++++++++++++++ drivers/power/pmic/Kconfig | 6 ++ drivers/power/pmic/Makefile | 1 + drivers/power/pmic/tps80031.c | 82 ++++++++++++++++++++++ include/power/tps80031.h | 42 +++++++++++ 5 files changed, 207 insertions(+) create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 include/power/tps80031.h
doc/device-tree-bindings/pmic/tps80031.txt new file +76 -0
@@ -0,0 +1,76 @@ +Texas Instruments, TPS80031/TPS80032 PMIC + +This device uses two drivers: +- drivers/power/pmic/tps80031.c (for parent device) +- drivers/power/regulator/tps80031_regulator.c (for child regulators) + +This chapter describes the binding info for the PMIC driver and regulators. + +Required properties for PMIC: +- compatible: "ti,tps80031" or "ti,tps80032" +- reg: 0x48 + +With those two properties, the pmic device can be used for read/write only. +To bind each regulator, the optional regulators subnode should exists. + +Optional subnode: +- name: regulators (subnode list of each device's regulator) + +Regulators subnode contains set on supported regulators. + +Required properties: +- regulator-name: used for regulator uclass platform data '.name', + +List of supported regulator nodes names for tps80031/tps80032: +- smps1, smps2, smps3, smps4, smps5 +- ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7, ldoln, ldousb + +SMPS5 in Linux 3.1.10 is referred as vio, but datasheet clearly names it SMPS5. + +Optional: +- regulator-min-microvolt: minimum allowed Voltage to set +- regulator-max-microvolt: minimum allowed Voltage to set +- regulator-always-on: regulator should be never disabled +- regulator-boot-on: regulator should be enabled by the bootloader + +Example: + +tps80032@48 { + compatible = "ti,tps80032"; + reg = <0x48>; + + regulators { + smps1 { + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1250000>; + regulator-always-on; + regulator-boot-on; + }; + + ... + + smps5 { + regulator-name = "vdd_1v8_gen"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + ldo1 { + regulator-name = "avdd_dsi_csi"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + }; + + ... + + ldousb { + regulator-name = "avdd_usb"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + }; +};
drivers/power/pmic/Kconfig +6 -0
@@ -347,6 +347,12 @@ config DM_PMIC_TPS65910 DC-DC converter, 8 LDOs and a RTC. This driver binds the SMPS and LDO pmic children. +config DM_PMIC_TPS80031 + bool "Enable driver for Texas Instruments TPS80031/TPS80032 PMIC" + ---help--- + The TPS80031/TPS80032 are PMIC's containing several LDOs, SMPS. + This driver binds the pmic children. + config PMIC_STPMIC1 bool "Enable support for STMicroelectronics STPMIC1 PMIC" depends on DM_I2C
drivers/power/pmic/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_$(SPL_)PMIC_RN5T567) += rn5t567.o obj-$(CONFIG_PMIC_TPS65090) += tps65090.o obj-$(CONFIG_PMIC_S5M8767) += s5m8767.o obj-$(CONFIG_DM_PMIC_TPS65910) += pmic_tps65910_dm.o +obj-$(CONFIG_$(SPL_)DM_PMIC_TPS80031) += tps80031.o obj-$(CONFIG_$(SPL_)PMIC_PALMAS) += palmas.o obj-$(CONFIG_$(SPL_)PMIC_LP873X) += lp873x.o obj-$(CONFIG_$(SPL_)PMIC_LP87565) += lp87565.o
drivers/power/pmic/tps80031.c new file +82 -0
82 lines not on this page · raw message
include/power/tps80031.h new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 4/6 power: regulator: tps80031: add regulator support
In reply to Svyatoslav RyhelThe driver provides regulator set/get voltage enable/disable functions for TI TPS80031/TPS80032 PMICs.
--- drivers/power/regulator/Kconfig | 8 + drivers/power/regulator/Makefile | 1 + drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++++++ 3 files changed, 305 insertions(+) create mode 100644 drivers/power/regulator/tps80031_regulator.c
drivers/power/regulator/Kconfig +8 -0
@@ -355,6 +355,14 @@ config DM_REGULATOR_TPS62360 implements the get/set api for value only, as the power line is always on. +config DM_REGULATOR_TPS80031 + bool "Enable driver for TPS80031/TPS80032 PMIC regulators" + depends on DM_PMIC_TPS80031 + ---help--- + This enables implementation of driver-model regulator uclass + features for TPS80031/TPS80032 PMICs. The driver implements + get/set api for: value and enable. + config DM_REGULATOR_STPMIC1 bool "Enable driver for STPMIC1 regulators" depends on DM_REGULATOR && PMIC_STPMIC1
drivers/power/regulator/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_$(SPL_)DM_REGULATOR_LP87565) += lp87565_regulator.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o obj-$(CONFIG_DM_REGULATOR_TPS65910) += tps65910_regulator.o obj-$(CONFIG_DM_REGULATOR_TPS62360) += tps62360_regulator.o +obj-$(CONFIG_$(SPL_)DM_REGULATOR_TPS80031) += tps80031_regulator.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_STPMIC1) += stpmic1.o obj-$(CONFIG_DM_REGULATOR_TPS65941) += tps65941_regulator.o obj-$(CONFIG_DM_REGULATOR_SCMI) += scmi_regulator.o
drivers/power/regulator/tps80031_regulator.c new file +296 -0
296 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 5/6 power: pmic: tps65910: add TPS65911 PMIC support
In reply to Svyatoslav RyhelAdd support to bind the regulators/child nodes with the pmic. Also adds the pmic i2c based read/write functions to access pmic registers.
--- doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++++++++++++++++++++ drivers/power/pmic/pmic_tps65910_dm.c | 26 +++++++- include/power/tps65910_pmic.h | 47 +++++++++++++ 3 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt
doc/device-tree-bindings/pmic/tps65911.txt new file +78 -0
@@ -0,0 +1,78 @@ +Texas Instruments, TPS65911 PMIC + +This device uses two drivers: +- drivers/power/pmic/tps65910.c (for parent device) +- drivers/power/regulator/tps65911_regulator.c (for child regulators) + +This chapter describes the binding info for the PMIC driver and regulators. + +Required properties for PMIC: +- compatible: "ti,tps65911" +- reg: 0x2d + +With those two properties, the pmic device can be used for read/write only. +To bind each regulator, the optional regulators subnode should exists. + +Optional subnode: +- name: regulators (subnode list of each device's regulator) + +Regulators subnode contains set on supported regulators. + +Required properties: +- regulator-name: used for regulator uclass platform data '.name', + +List of supported regulator nodes names for tps65911: +- vdd1, vdd2, vddctrl, vddio +- ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7, ldo8 + +vddio in datasheet is referred as vio, but for reduction of code and +unification of smps regulators it is named vddio. + +Optional: +- regulator-min-microvolt: minimum allowed Voltage to set +- regulator-max-microvolt: minimum allowed Voltage to set +- regulator-always-on: regulator should be never disabled +- regulator-boot-on: regulator should be enabled by the bootloader + +Example: + +tps65911@2d { + compatible = "ti,tps65911"; + reg = <0x2d>; + + regulators { + vdd1 { + regulator-name = "vdd_1v2_backlight"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-boot-on; + }; + + ... + + vddio { + regulator-name = "vdd_1v8_gen"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + ldo1 { + regulator-name = "vdd_emmc_core"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + ... + + ldo8 { + regulator-name = "vdd_ddr_hs"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + }; +};
drivers/power/pmic/pmic_tps65910_dm.c +23 -3
@@ -11,13 +11,19 @@#include <power/regulator.h> #include <power/tps65910_pmic.h> -static const struct pmic_child_info pmic_children_info[] = { +static const struct pmic_child_info tps65910_children_info[] = { { .prefix ="ldo_" , .driver =TPS65910_LDO_DRIVER }, { .prefix ="buck_" , .driver =TPS65910_BUCK_DRIVER }, { .prefix ="boost_" , .driver =TPS65910_BOOST_DRIVER }, { }, }; +static const struct pmic_child_info tps65911_children_info[] = { + { .prefix ="vdd" , .driver =TPS65911_VDD_DRIVER }, + { .prefix ="ldo" , .driver =TPS65911_LDO_DRIVER }, + { }, +}; +static int pmic_tps65910_reg_count (struct udevice *dev) {return TPS65910_NUM_REGS ;
@@ -51,6 +57,7 @@ static int pmic_tps65910_bind(struct udevice *dev) {ofnode regulators_node;int children; +int type =dev_get_driver_data (dev); regulators_node =dev_read_subnode (dev,"regulators" );if (!ofnode_valid (regulators_node)) {
@@ -58,7 +65,19 @@ static int pmic_tps65910_bind(struct udevice *dev)return -EINVAL ; } - children =pmic_bind_children (dev, regulators_node, pmic_children_info); +switch (type) { +case TPS65910 : + children =pmic_bind_children (dev, regulators_node, + tps65910_children_info); +break ; +case TPS65911 : + children =pmic_bind_children (dev, regulators_node, + tps65911_children_info); +break ; +default : +log_err ("unknown PMIC type\n" ); + } +if (!children)debug ("%s has no children (regulators)\n" , dev->name);
@@ -82,7 +101,8 @@ static struct dm_pmic_ops pmic_tps65910_ops = { };static const struct udevice_id pmic_tps65910_match[] = { - { .compatible ="ti,tps65910" }, + { .compatible ="ti,tps65910" , .data =TPS65910 }, + { .compatible ="ti,tps65911" , .data =TPS65911 }, {/* sentinel */ } };
include/power/tps65910_pmic.h +47 -0
57 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 6/6 power: regulator: tps65911: add regulator support
In reply to Svyatoslav RyhelThe driver provides regulator set/get voltage enable/disable functions for TI TPS5911 PMIC.
--- drivers/power/regulator/Kconfig | 8 + drivers/power/regulator/Makefile | 1 + drivers/power/regulator/tps65911_regulator.c | 375 +++++++++++++++++++ 3 files changed, 384 insertions(+) create mode 100644 drivers/power/regulator/tps65911_regulator.c
drivers/power/regulator/Kconfig +8 -0
@@ -345,6 +345,14 @@ config DM_REGULATOR_TPS65910 regulator types of the TPS65910 (BUCK, BOOST and LDO). It implements the get/set api for value and enable. +config DM_REGULATOR_TPS65911 + bool "Enable driver for TPS65911 PMIC regulators" + depends on DM_PMIC_TPS65910 + ---help--- + The TPS65911 PMIC provides 4 SMPSs and 8 LDOs. This driver supports all + regulator types of the TPS65911. It implements the get/set api for value + and enable. + config DM_REGULATOR_TPS62360 bool "Enable driver for TPS6236x Power Regulator" depends on DM_REGULATOR
drivers/power/regulator/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_$(SPL_)DM_REGULATOR_LP873X) += lp873x_regulator.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_LP87565) += lp87565_regulator.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o obj-$(CONFIG_DM_REGULATOR_TPS65910) += tps65910_regulator.o +obj-$(CONFIG_DM_REGULATOR_TPS65911) += tps65911_regulator.o obj-$(CONFIG_DM_REGULATOR_TPS62360) += tps62360_regulator.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_TPS80031) += tps80031_regulator.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_STPMIC1) += stpmic1.o
drivers/power/regulator/tps65911_regulator.c new file +375 -0
375 lines not on this page · raw message
Signature · 1 line
2.39.2
Greetings!
I have one more improvement for these drivers which is implementation of do_poweroff ability directly into them. I have tested it already and it is a trivial task. What is non trivial is that pmic can be not responsible for poweroff if the device uses 2 or more pmics.
Solution I am looking into is use of 'system-power-controller' device tree property to indicate PMIC used for poweroff function. Issue I have encountered is how to properly convert dts prop into #ifdef to be able to hide or expose do_poweroff at will, and if this is allowed at all in u-boot.
Best regards,
Svyatoslav R.
пт, 14 лип. 2023 р. о 19:16 Svyatoslav Ryhel <[email protected]> пише:
Quoted 49 lines
Patch set adds basic support for PMICs used in many Tegra 3 devices. All PMIC drivers are based on datasheets provided by vendors. Implemented API include regulator set/get voltage enable/disable and basic PMIC r/w capabilities.
Drivers were tested by me on LG P895 (max77663), HTC One X (TPS80032) and ASUS TF300T (tps65911). Calculations and behavior were correct, predictable and reproducible.
Svyatoslav Ryhel (6):
power: pmic: add the base max77663 pmic support
power: regulator: max77663: add regulator support
power: pmic: add the base TPS80031 PMIC support
power: regulator: tps80031: add regulator support
power: pmic: tps65910: add TPS65911 PMIC support
power: regulator: tps65911: add regulator supportdoc/device-tree-bindings/pmic/max77663.txt | 84 +++++ doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++ doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++ drivers/power/pmic/Kconfig | 12 + drivers/power/pmic/Makefile | 2 + drivers/power/pmic/max77663.c | 81 ++++ drivers/power/pmic/pmic_tps65910_dm.c | 26 +- drivers/power/pmic/tps80031.c | 82 ++++ drivers/power/regulator/Kconfig | 24 ++ drivers/power/regulator/Makefile | 3 + drivers/power/regulator/max77663_regulator.c | 362 ++++++++++++++++++ drivers/power/regulator/tps65911_regulator.c | 375 +++++++++++++++++++ drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++ include/power/max77663.h | 40 ++ include/power/tps65910_pmic.h | 47 +++ include/power/tps80031.h | 42 +++ 16 files changed, 1627 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 drivers/power/regulator/max77663_regulator.c create mode 100644 drivers/power/regulator/tps65911_regulator.c create mode 100644 drivers/power/regulator/tps80031_regulator.c create mode 100644 include/power/max77663.h create mode 100644 include/power/tps80031.h--
2.39.2
Hi
Quoted 8 lines
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Saturday, July 15, 2023 1:16 AM
To: Jaehoon Chung <[email protected]>; Simon Glass <[email protected]>; Svyatoslav Ryhel <[email protected]>
Cc: [email protected]
Subject: [PATCH v1 0/6] Add support for PMICs used on Tegra 3 devices
Quoted 8 lines
Patch set adds basic support for PMICs used in many Tegra 3 devices. All PMIC drivers are based on datasheets provided by vendors. Implemented API include regulator set/get voltage enable/disable and basic PMIC r/w capabilities.
Drivers were tested by me on LG P895 (max77663), HTC One X (TPS80032) and ASUS TF300T (tps65911). Calculations and behavior were correct, predictable and reproducible.
I didn't find where those drivers is using. Do you have any plan to update the enabling CONFIG? I hope the enabling CONFIG will be included. Otherwise, I can't check whether its building is fine or not. If I missed some patches, let me know, plz
Until enabled CONFIG, these drivers can be dead codes.
Best Regards,
Jaehoon Chung
Quoted 39 lines
Svyatoslav Ryhel (6):
power: pmic: add the base max77663 pmic support
power: regulator: max77663: add regulator support
power: pmic: add the base TPS80031 PMIC support
power: regulator: tps80031: add regulator support
power: pmic: tps65910: add TPS65911 PMIC support
power: regulator: tps65911: add regulator supportdoc/device-tree-bindings/pmic/max77663.txt | 84 +++++ doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++ doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++ drivers/power/pmic/Kconfig | 12 + drivers/power/pmic/Makefile | 2 + drivers/power/pmic/max77663.c | 81 ++++ drivers/power/pmic/pmic_tps65910_dm.c | 26 +- drivers/power/pmic/tps80031.c | 82 ++++ drivers/power/regulator/Kconfig | 24 ++ drivers/power/regulator/Makefile | 3 + drivers/power/regulator/max77663_regulator.c | 362 ++++++++++++++++++ drivers/power/regulator/tps65911_regulator.c | 375 +++++++++++++++++++ drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++ include/power/max77663.h | 40 ++ include/power/tps65910_pmic.h | 47 +++ include/power/tps80031.h | 42 +++ 16 files changed, 1627 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 drivers/power/regulator/max77663_regulator.c create mode 100644 drivers/power/regulator/tps65911_regulator.c create mode 100644 drivers/power/regulator/tps80031_regulator.c create mode 100644 include/power/max77663.h create mode 100644 include/power/tps80031.h--
2.39.2
20 липня 2023 р. 06:12:23 GMT+03:00, Jaehoon Chung <[email protected]> написав(-ла):
Quoted 19 lines
Hi
Quoted 8 lines
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Saturday, July 15, 2023 1:16 AM
To: Jaehoon Chung <[email protected]>; Simon Glass <[email protected]>; Svyatoslav Ryhel <[email protected]>
Cc: [email protected]
Subject: [PATCH v1 0/6] Add support for PMICs used on Tegra 3 devicesQuoted 8 lines
Patch set adds basic support for PMICs used in many Tegra 3 devices. All PMIC drivers are based on datasheets provided by vendors. Implemented API include regulator set/get voltage enable/disable and basic PMIC r/w capabilities.
Drivers were tested by me on LG P895 (max77663), HTC One X (TPS80032) and ASUS TF300T (tps65911). Calculations and behavior were correct, predictable and reproducible.
Quoted 5 lines
I didn't find where those drivers is using. Do you have any plan to update the enabling CONFIG? I hope the enabling CONFIG will be included. Otherwise, I can't check whether its building is fine or not. If I missed some patches, let me know, plz
Until enabled CONFIG, these drivers can be dead codes.
Enabling configs is planned as next step of this https://patchwork.ozlabs.org/project/uboot/list/?series=361808 patchset (initial bringup of devices). Unfortunately tegra custodians are too "busy" to initiate merge of those devices.
Quoted 44 lines
Best Regards,
Jaehoon ChungQuoted 39 lines
Svyatoslav Ryhel (6):
power: pmic: add the base max77663 pmic support
power: regulator: max77663: add regulator support
power: pmic: add the base TPS80031 PMIC support
power: regulator: tps80031: add regulator support
power: pmic: tps65910: add TPS65911 PMIC support
power: regulator: tps65911: add regulator supportdoc/device-tree-bindings/pmic/max77663.txt | 84 +++++ doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++ doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++ drivers/power/pmic/Kconfig | 12 + drivers/power/pmic/Makefile | 2 + drivers/power/pmic/max77663.c | 81 ++++ drivers/power/pmic/pmic_tps65910_dm.c | 26 +- drivers/power/pmic/tps80031.c | 82 ++++ drivers/power/regulator/Kconfig | 24 ++ drivers/power/regulator/Makefile | 3 + drivers/power/regulator/max77663_regulator.c | 362 ++++++++++++++++++ drivers/power/regulator/tps65911_regulator.c | 375 +++++++++++++++++++ drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++ include/power/max77663.h | 40 ++ include/power/tps65910_pmic.h | 47 +++ include/power/tps80031.h | 42 +++ 16 files changed, 1627 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 drivers/power/regulator/max77663_regulator.c create mode 100644 drivers/power/regulator/tps65911_regulator.c create mode 100644 drivers/power/regulator/tps80031_regulator.c create mode 100644 include/power/max77663.h create mode 100644 include/power/tps80031.h--
2.39.2
Quoted 36 lines
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Thursday, July 20, 2023 12:26 PM
To: Jaehoon Chung <[email protected]>; 'Simon Glass' <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH v1 0/6] Add support for PMICs used on Tegra 3 devices20 липня 2023 р. 06:12:23 GMT+03:00, Jaehoon Chung <[email protected]> написав(-ла):
Quoted 15 lines
Hi
Quoted 13 lines
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Saturday, July 15, 2023 1:16 AM
To: Jaehoon Chung <[email protected]>; Simon Glass <[email protected]>; Svyatoslav Ryhel <[email protected]>
Cc: [email protected]
Subject: [PATCH v1 0/6] Add support for PMICs used on Tegra 3 devicesPatch set adds basic support for PMICs used in many Tegra 3 devices. All PMIC drivers are based on datasheets provided by vendors. Implemented API include regulator set/get voltage enable/disable and basic PMIC r/w capabilities.
Quoted 6 lines
Quoted 3 lines
Drivers were tested by me on LG P895 (max77663), HTC One X (TPS80032) and ASUS TF300T (tps65911). Calculations and behavior were correct, predictable and reproducible.
I didn't find where those drivers is using. Do you have any plan to update the enabling CONFIG? I hope the enabling CONFIG will be included. Otherwise, I can't check whether its building is fine or
not.
Quoted 2 lines
If I missed some patches, let me know, plz
Quoted 7 lines
Quoted 1 line
Until enabled CONFIG, these drivers can be dead codes.
Enabling configs is planned as next step of this https://protect2.fireeye.com/v1/url?k=a8a63aa5-
c92d2f85-a8a7b1ea-74fe485fb347-c1cc2b9c6f97e343&q=1&e=c08f18ed-4f66-46bb-b871- 17167bc5b502&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D361808 patchset (initial bringup of devices). Unfortunately tegra custodians are too "busy" to initiate merge of those devices.
Thanks for sharing information. :)
Best Regards,
Jaehoon Chung
Quoted 45 lines
Quoted 45 lines
Best Regards,
Jaehoon ChungQuoted 39 lines
Svyatoslav Ryhel (6):
power: pmic: add the base max77663 pmic support
power: regulator: max77663: add regulator support
power: pmic: add the base TPS80031 PMIC support
power: regulator: tps80031: add regulator support
power: pmic: tps65910: add TPS65911 PMIC support
power: regulator: tps65911: add regulator supportdoc/device-tree-bindings/pmic/max77663.txt | 84 +++++ doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++ doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++ drivers/power/pmic/Kconfig | 12 + drivers/power/pmic/Makefile | 2 + drivers/power/pmic/max77663.c | 81 ++++ drivers/power/pmic/pmic_tps65910_dm.c | 26 +- drivers/power/pmic/tps80031.c | 82 ++++ drivers/power/regulator/Kconfig | 24 ++ drivers/power/regulator/Makefile | 3 + drivers/power/regulator/max77663_regulator.c | 362 ++++++++++++++++++ drivers/power/regulator/tps65911_regulator.c | 375 +++++++++++++++++++ drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++ include/power/max77663.h | 40 ++ include/power/tps65910_pmic.h | 47 +++ include/power/tps80031.h | 42 +++ 16 files changed, 1627 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 drivers/power/regulator/max77663_regulator.c create mode 100644 drivers/power/regulator/tps65911_regulator.c create mode 100644 drivers/power/regulator/tps80031_regulator.c create mode 100644 include/power/max77663.h create mode 100644 include/power/tps80031.h--
2.39.2
чт, 20 лип. 2023 р. о 09:17 Jaehoon Chung <[email protected]> пише:
Quoted 39 lines
Quoted 39 lines
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Thursday, July 20, 2023 12:26 PM
To: Jaehoon Chung <[email protected]>; 'Simon Glass' <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH v1 0/6] Add support for PMICs used on Tegra 3 devices20 липня 2023 р. 06:12:23 GMT+03:00, Jaehoon Chung <[email protected]> написав(-ла):
Quoted 15 lines
Hi
Quoted 13 lines
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Saturday, July 15, 2023 1:16 AM
To: Jaehoon Chung <[email protected]>; Simon Glass <[email protected]>; Svyatoslav Ryhel <[email protected]>
Cc: [email protected]
Subject: [PATCH v1 0/6] Add support for PMICs used on Tegra 3 devicesPatch set adds basic support for PMICs used in many Tegra 3 devices. All PMIC drivers are based on datasheets provided by vendors. Implemented API include regulator set/get voltage enable/disable and basic PMIC r/w capabilities.
Quoted 6 lines
Quoted 3 lines
Drivers were tested by me on LG P895 (max77663), HTC One X (TPS80032) and ASUS TF300T (tps65911). Calculations and behavior were correct, predictable and reproducible.
I didn't find where those drivers is using. Do you have any plan to update the enabling CONFIG? I hope the enabling CONFIG will be included. Otherwise, I can't check whether its building is fine or
not.
Quoted 3 lines
If I missed some patches, let me know, plz
Until enabled CONFIG, these drivers can be dead codes.
Quoted 7 lines
Quoted 5 lines
Enabling configs is planned as next step of this https://protect2.fireeye.com/v1/url?k=a8a63aa5-
c92d2f85-a8a7b1ea-74fe485fb347-c1cc2b9c6f97e343&q=1&e=c08f18ed-4f66-46bb-b871- 17167bc5b502&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D361808 patchset (initial bringup of devices). Unfortunately tegra custodians are too "busy" to initiate merge of those devices.Thanks for sharing information. :)
Ye, you're welcome I guess :) These mailing lists kill me. Search in patchwork for series
called "Tegra: add ASUS/Google Nexus 7 (2012) support" it contains devices I have
mentioned.
Quoted 50 lines
Best Regards,
Jaehoon ChungQuoted 45 lines
Quoted 45 lines
Best Regards,
Jaehoon ChungQuoted 39 lines
Svyatoslav Ryhel (6):
power: pmic: add the base max77663 pmic support
power: regulator: max77663: add regulator support
power: pmic: add the base TPS80031 PMIC support
power: regulator: tps80031: add regulator support
power: pmic: tps65910: add TPS65911 PMIC support
power: regulator: tps65911: add regulator supportdoc/device-tree-bindings/pmic/max77663.txt | 84 +++++ doc/device-tree-bindings/pmic/tps65911.txt | 78 ++++ doc/device-tree-bindings/pmic/tps80031.txt | 76 ++++ drivers/power/pmic/Kconfig | 12 + drivers/power/pmic/Makefile | 2 + drivers/power/pmic/max77663.c | 81 ++++ drivers/power/pmic/pmic_tps65910_dm.c | 26 +- drivers/power/pmic/tps80031.c | 82 ++++ drivers/power/regulator/Kconfig | 24 ++ drivers/power/regulator/Makefile | 3 + drivers/power/regulator/max77663_regulator.c | 362 ++++++++++++++++++ drivers/power/regulator/tps65911_regulator.c | 375 +++++++++++++++++++ drivers/power/regulator/tps80031_regulator.c | 296 +++++++++++++++ include/power/max77663.h | 40 ++ include/power/tps65910_pmic.h | 47 +++ include/power/tps80031.h | 42 +++ 16 files changed, 1627 insertions(+), 3 deletions(-) create mode 100644 doc/device-tree-bindings/pmic/max77663.txt create mode 100644 doc/device-tree-bindings/pmic/tps65911.txt create mode 100644 doc/device-tree-bindings/pmic/tps80031.txt create mode 100644 drivers/power/pmic/max77663.c create mode 100644 drivers/power/pmic/tps80031.c create mode 100644 drivers/power/regulator/max77663_regulator.c create mode 100644 drivers/power/regulator/tps65911_regulator.c create mode 100644 drivers/power/regulator/tps80031_regulator.c create mode 100644 include/power/max77663.h create mode 100644 include/power/tps80031.h--
2.39.2