mfd: lp87565: Add support for 4-phase lp87561 combination
Subsystems (3)
cover mfd: lp87565: Add support for 4-phase lp87561 combination
Add support for 4-phase lp87561 combination.
Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf
Keerthy (3):
dt-bindings: mfd: lp87565: Add lp87561 configuration
mfd: lp87565: Add support for 4-phase lp87561 combination
regulator: lp87565: Add 4-phase lp87561 regulator support
.../devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++ drivers/mfd/lp87565.c | 4 +++ drivers/regulator/lp87565-regulator.c | 9 +++++ include/linux/mfd/lp87565.h | 2 ++ 4 files changed, 51 insertions(+)
Signature · 1 line
2.17.1
PATCH 1/3 dt-bindings: mfd: lp87565: Add lp87561 configuration
lp87561 is a single output 4-phase regulator configuration. Add support for the same.
Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf
--- .../devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)
Documentation/devicetree/bindings/mfd/lp87565.txt +36 -0
@@ -41,3 +41,39 @@ lp87565_pmic: pmic@60 { }; }; }; + +TI LP87561 PMIC: + +This is a single output 4-phase regulator configuration + +Required properties: + - compatible: "ti,lp87561-q1" + - reg: I2C slave address. + - gpio-controller: Marks the device node as a GPIO Controller. + - #gpio-cells: Should be two. The first cell is the pin number and + the second cell is used to specify flags. + See ../gpio/gpio.txt for more information. + - xxx-in-supply: Phandle to parent supply node of each regulator + populated under regulators node. xxx should match + the supply_name populated in driver. +Example: + +lp87561_pmic: pmic@62 { + compatible = "ti,lp87561-q1"; + reg = <0x62>; + gpio-controller; + #gpio-cells = <2>; + + buck3210-in-supply = <&vsys_3v3>; + + regulators: regulators { + buck3210_reg: buck3210 { + /* VDD_CORE */ + regulator-name = "buck3210"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-always-on; + regulator-boot-on; + }; + }; +};
Signature · 1 line
2.17.1
Lee Jones
AppliedRe: [PATCH 1/3] dt-bindings: mfd: lp87565: Add lp87561 configuration
Quoted 9 lines · Keerthy
lp87561 is a single output 4-phase regulator configuration. Add support for the same.
Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf
Signed-off-by Keerthy <[email protected]>--- .../devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 2/3 mfd: lp87565: Add support for 4-phase lp87561 combination
In reply to KeerthyAdd support for 4-phase lp87561 combination.
Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf
--- drivers/mfd/lp87565.c | 4 ++++ include/linux/mfd/lp87565.h | 2 ++ 2 files changed, 6 insertions(+)
drivers/mfd/lp87565.c +4 -0
@@ -33,6 +33,10 @@ static const struct of_device_id of_lp87565_match_table[] = { .compatible = "ti,lp87565-q1", .data = (void *)LP87565_DEVICE_TYPE_LP87565_Q1, }, + { + .compatible = "ti,lp87561-q1", + .data = (void *)LP87565_DEVICE_TYPE_LP87561_Q1, + }, {} };MODULE_DEVICE_TABLE (of, of_lp87565_match_table);
include/linux/mfd/lp87565.h +2 -0
@@ -17,6 +17,7 @@enum lp87565_device_type {LP87565_DEVICE_TYPE_UNKNOWN =0 , +LP87565_DEVICE_TYPE_LP87561_Q1 ,LP87565_DEVICE_TYPE_LP87565_Q1 , };
@@ -249,6 +250,7 @@ enum LP87565_regulator_id {LP87565_BUCK_3 ,LP87565_BUCK_10 ,LP87565_BUCK_23 , + LP87565_BUCK_3210, };/**
Signature · 1 line
2.17.1
Lee Jones
AppliedQuoted 9 lines · Keerthy
Add support for 4-phase lp87561 combination.
Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf
Signed-off-by Keerthy <[email protected]>--- drivers/mfd/lp87565.c | 4 ++++ include/linux/mfd/lp87565.h | 2 ++ 2 files changed, 6 insertions(+)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 3/3 regulator: lp87565: Add 4-phase lp87561 regulator support
In reply to KeerthyThe LP8756x family has a single output 4-phase regulator configuration. Add support for the same. The control lies in the master buck which is buck0 for 4-phase configuration. Enable/disable/voltage set happen via buck0 registers.
Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf
--- drivers/regulator/lp87565-regulator.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/regulator/lp87565-regulator.c +9 -0
@@ -153,6 +153,12 @@ static const struct lp87565_regulator regulators[] = { LP87565_REG_BUCK2_CTRL_1, LP87565_BUCK_CTRL_1_EN, 3230, buck0_1_2_3_ranges, LP87565_REG_BUCK2_CTRL_2), + LP87565_REGULATOR("BUCK3210", LP87565_BUCK_3210, "buck3210", + lp87565_buck_ops, 256, LP87565_REG_BUCK0_VOUT, + LP87565_BUCK_VSET, LP87565_REG_BUCK0_CTRL_1, + LP87565_BUCK_CTRL_1_EN | + LP87565_BUCK_CTRL_1_FPWM_MP_0_2, 3230, + buck0_1_2_3_ranges, LP87565_REG_BUCK0_CTRL_2), };static int lp87565_regulator_probe (struct platform_device *pdev)
@@ -172,6 +178,9 @@ static int lp87565_regulator_probe(struct platform_device *pdev)if (lp87565->dev_type ==LP87565_DEVICE_TYPE_LP87565_Q1 ) { min_idx =LP87565_BUCK_10 ; max_idx =LP87565_BUCK_23 ; + }else if (lp87565->dev_type ==LP87565_DEVICE_TYPE_LP87561_Q1 ) { + min_idx =LP87565_BUCK_3210 ; + max_idx =LP87565_BUCK_3210 ; }for (i = min_idx; i <= max_idx; i++) {
Signature · 1 line
2.17.1
Mark Brown
maintainerRe: [PATCH 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
drivers/regulator/lp87565-regulator.c static int lp87565_regulator_probe(struct platform_device *pdev) · line 183
Quoted 7 lines · Keerthy
drivers/regulator/lp87565-regulator.c +3
-0@@ -172,6 +178,9 @@ static int lp87565_regulator_probe(struct platform_device *pdev)if (lp87565->dev_type ==LP87565_DEVICE_TYPE_LP87565_Q1 ) { min_idx =LP87565_BUCK_10 ; max_idx =LP87565_BUCK_23 ; + }else if (lp87565->dev_type ==LP87565_DEVICE_TYPE_LP87561_Q1 ) { + min_idx =LP87565_BUCK_3210 ; + max_idx =LP87565_BUCK_3210 ;
This if/else chain should be a switch statement.
Re: [PATCH 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
Quoted 11 lines · Mark Brown
drivers/regulator/lp87565-regulator.c static int lp87565_regulator_probe(struct platform_device *pdev) · line 183
Quoted 7 lines · Keerthy
drivers/regulator/lp87565-regulator.c +3
-0@@ -172,6 +178,9 @@ static int lp87565_regulator_probe(struct platform_device *pdev)if (lp87565->dev_type ==LP87565_DEVICE_TYPE_LP87565_Q1 ) { min_idx =LP87565_BUCK_10 ; max_idx =LP87565_BUCK_23 ; + }else if (lp87565->dev_type ==LP87565_DEVICE_TYPE_LP87561_Q1 ) { + min_idx =LP87565_BUCK_3210 ; + max_idx =LP87565_BUCK_3210 ;This if/else chain should be a switch statement.
Okay. I will convert that in v2.
Thanks,
Keerthy