2014-07-08 10:23:26

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 0/7] ARM: dts: AM43x: Add devcice tree nodes

The patch series adds the device tree nodes and the corresponding
documentation. The series also enabled tps65218 config options
in the omap2plus_defconfig.

The series is boot tested on both AM43x-epos-evm and AM437x-gp-evm.

Keerthy (7):
mfd: Add DT bindings for tps65218 PMIC
regulator: Add DT bindings for tps65218 PMIC regulators.
ARM: dts: AM43x: Add TPS65218 device tree nodes
ARM: dts: AM437x: Fix i2c nodes indentation
ARM: dts: AM437x: Add TPS65218 device tree nodes
regulator: tps65218: Add get_voltage ops for dcdc5 and dcdc6
ARM: configs: omap2plus_defconfig: enable TPS65218 configs

Documentation/devicetree/bindings/mfd/tps65218.txt | 89 ++++++++++++++++++++
.../devicetree/bindings/regulator/tps65218.txt | 23 +++++
arch/arm/boot/dts/am437x-gp-evm.dts | 71 ++++++++++++++--
arch/arm/boot/dts/am43x-epos-evm.dts | 59 +++++++++++++
arch/arm/configs/omap2plus_defconfig | 2 +
drivers/regulator/tps65218-regulator.c | 9 ++
6 files changed, 246 insertions(+), 7 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/tps65218.txt
create mode 100644 Documentation/devicetree/bindings/regulator/tps65218.txt

--
1.7.9.5


2014-07-08 10:23:28

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 1/7] mfd: Add DT bindings for tps65218 PMIC

Add DT bindings for tps65218 PMIC

Signed-off-by: Keerthy <[email protected]>
---

Changes in V2:
* Added dcdc3, dcdc5, dcdc6 compatible properties.

Documentation/devicetree/bindings/mfd/tps65218.txt | 89 ++++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/tps65218.txt

diff --git a/Documentation/devicetree/bindings/mfd/tps65218.txt b/Documentation/devicetree/bindings/mfd/tps65218.txt
new file mode 100644
index 0000000..01ac973
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/tps65218.txt
@@ -0,0 +1,89 @@
+Texas Instruments TPS65218 family
+
+The TPS65218 are Integrated Power Management Chips.
+
+Required properties:
+- compatible : Must be "ti,tps65218";
+ For Integrated power-management used in AM437x based boards
+- interrupts : This i2c device has an IRQ line connected to the main SoC
+- interrupt-controller : Since the tps65218 supports several interrupts
+ internally, it is considered as an interrupt controller cascaded to the
+ SoC one.
+- #interrupt-cells = <2>;
+- interrupt-parent : The parent interrupt controller which is gic.
+
+Optional node:
+- TPS65218 PMIC has a number of child nodes. Mainly the regularors and SMPSs.
+
+Example:
+/*
+ * Integrated Power Management Chip
+ */
+tps65218: tps65218@24 {
+ reg = <0x24>;
+ compatible = "ti,tps65218";
+ interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
+ interrupt-parent = <&gic>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ dcdc1: regulator-dcdc1 {
+ compatible = "ti,tps65218-dcdc1";
+ /* VDD_CORE voltage limits min of OPP50 and max of OPP100 */
+ regulator-name = "vdd_core";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <1144000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc2: regulator-dcdc2 {
+ compatible = "ti,tps65218-dcdc2";
+ /* VDD_MPU voltage limits min of OPP50 and max of OPP_NITRO */
+ regulator-name = "vdd_mpu";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <1378000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc3: regulator-dcdc3 {
+ compatible = "ti,tps65218-dcdc3";
+ regulator-name = "vdcdc3";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc4: regulator-dcdc4 {
+ compatible = "ti,tps65218-dcdc4";
+ regulator-name = "v3_3d";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc5: regulator-dcdc5 {
+ compatible = "ti,tps65218-dcdc5";
+ regulator-name = "v1_0bat";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ };
+
+ dcdc6: regulator-dcdc6 {
+ compatible = "ti,tps65218-dcdc6";
+ regulator-name = "v1_8vat";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ ldo1: regulator-ldo1 {
+ compatible = "ti,tps65218-ldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+};
--
1.7.9.5

2014-07-08 10:23:37

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 4/7] ARM: dts: AM437x: Fix i2c nodes indentation

Fix i2c nodes indentation.

Signed-off-by: Keerthy <[email protected]>
---
arch/arm/boot/dts/am437x-gp-evm.dts | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index 003766c..85ca430 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -257,16 +257,15 @@
};

&i2c0 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&i2c0_pins>;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins>;
};

&i2c1 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&i2c1_pins>;
-
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
pixcir_ts@5c {
compatible = "pixcir,pixcir_tangoc";
pinctrl-names = "default";
--
1.7.9.5

2014-07-08 10:23:44

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 5/7] ARM: dts: AM437x: Add TPS65218 device tree nodes

Add TPS65218 device tree nodes. i2c clock frequency setting
also added as part of tps65218 nodes addition. As i2c clock
enabling is required.

Signed-off-by: Keerthy <[email protected]>
---

Changes in V2:
*Added dcdc3, dcdc5, dcdc6 nodes

arch/arm/boot/dts/am437x-gp-evm.dts | 58 +++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index 85ca430..f0422c2 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -260,6 +260,64 @@
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
+ clock-frequency = <400000>;
+
+ tps65218: tps65218@24 {
+ reg = <0x24>;
+ compatible = "ti,tps65218";
+ interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
+ interrupt-parent = <&gic>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ dcdc1: regulator-dcdc1 {
+ compatible = "ti,tps65218-dcdc1";
+ regulator-name = "vdd_core";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <1144000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc2: regulator-dcdc2 {
+ compatible = "ti,tps65218-dcdc2";
+ regulator-name = "vdd_mpu";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <1378000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc3: regulator-dcdc3 {
+ compatible = "ti,tps65218-dcdc3";
+ regulator-name = "vdcdc3";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ dcdc5: regulator-dcdc5 {
+ compatible = "ti,tps65218-dcdc5";
+ regulator-name = "v1_0bat";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ };
+
+ dcdc6: regulator-dcdc6 {
+ compatible = "ti,tps65218-dcdc6";
+ regulator-name = "v1_8bat";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ ldo1: regulator-ldo1 {
+ compatible = "ti,tps65218-ldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
};

&i2c1 {
--
1.7.9.5

2014-07-08 10:23:57

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 7/7] ARM: configs: omap2plus_defconfig: enable TPS65218 configs

Enable TPS65218 config options.

Signed-off-by: Keerthy <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
---
arch/arm/configs/omap2plus_defconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 536a137..f650f00 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -180,6 +180,7 @@ CONFIG_TWL4030_WATCHDOG=y
CONFIG_MFD_SYSCON=y
CONFIG_MFD_PALMAS=y
CONFIG_MFD_TPS65217=y
+CONFIG_MFD_TPS65218=y
CONFIG_MFD_TPS65910=y
CONFIG_TWL6040_CORE=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
@@ -188,6 +189,7 @@ CONFIG_REGULATOR_TI_ABB=y
CONFIG_REGULATOR_TPS65023=y
CONFIG_REGULATOR_TPS6507X=y
CONFIG_REGULATOR_TPS65217=y
+CONFIG_REGULATOR_TPS65218=y
CONFIG_REGULATOR_TPS65910=y
CONFIG_REGULATOR_TWL4030=y
CONFIG_REGULATOR_PBIAS=y
--
1.7.9.5

2014-07-08 10:23:47

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 6/7] regulator: tps65218: Add get_voltage ops for dcdc5 and dcdc6

Add get_voltage ops for dcdc5 and dcdc6. Both dcdc5 and 6 are fixed regulators
and hence return min_uV (or max_uV).

Signed-off-by: Keerthy <[email protected]>
---
drivers/regulator/tps65218-regulator.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index 9effe48..700c652 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -151,6 +151,14 @@ static int tps65218_pmic_disable(struct regulator_dev *dev)
dev->desc->enable_mask, TPS65218_PROTECT_L1);
}

+static int tps65218_pmic_dcdc56_get_voltage(struct regulator_dev *dev)
+{
+ struct tps65218 *tps = rdev_get_drvdata(dev);
+ unsigned int rid = rdev_get_id(dev);
+
+ return tps->info[rid]->min_uV;
+}
+
/* Operations permitted on DCDC1, DCDC2 */
static struct regulator_ops tps65218_dcdc12_ops = {
.is_enabled = regulator_is_enabled_regmap,
@@ -179,6 +187,7 @@ static struct regulator_ops tps65218_dcdc56_pmic_ops = {
.is_enabled = regulator_is_enabled_regmap,
.enable = tps65218_pmic_enable,
.disable = tps65218_pmic_disable,
+ .get_voltage = tps65218_pmic_dcdc56_get_voltage,
};

static const struct regulator_desc regulators[] = {
--
1.7.9.5

2014-07-08 10:23:34

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 2/7] regulator: Add DT bindings for tps65218 PMIC regulators.

Add DT bindings for tps65218 PMIC regulators.

Signed-off-by: Keerthy <[email protected]>
---

Changes in V2:
* Added dcdc3, dcdc5, dcdc6 compatible properties.

.../devicetree/bindings/regulator/tps65218.txt | 23 ++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/tps65218.txt

diff --git a/Documentation/devicetree/bindings/regulator/tps65218.txt b/Documentation/devicetree/bindings/regulator/tps65218.txt
new file mode 100644
index 0000000..fccc1d2
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/tps65218.txt
@@ -0,0 +1,23 @@
+TPS65218 family of regulators
+
+Required properties:
+For tps65218 regulators/LDOs
+- compatible:
+ - "ti,tps65218-dcdc1" for DCDC1
+ - "ti,tps65218-dcdc2" for DCDC2
+ - "ti,tps65218-dcdc3" for DCDC3
+ - "ti,tps65218-dcdc4" for DCDC4
+ - "ti,tps65218-dcdc5" for DCDC5
+ - "ti,tps65218-dcdc6" for DCDC6
+ - "ti,tps65218-ldo1" for LDO1
+
+Optional properties:
+- Any optional property defined in bindings/regulator/regulator.txt
+
+Example:
+
+ xyz: regulator@0 {
+ compatible = "ti,tps65218-dcdc1";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <3000000>;
+ };
--
1.7.9.5

2014-07-08 10:23:33

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 3/7] ARM: dts: AM43x: Add TPS65218 device tree nodes

Add TPS65218 device tree nodes. i2c clock frequency setting
also added as part of tps65218 nodes addition. As i2c clock
enabling is required.

Signed-off-by: Keerthy <[email protected]>
---

Changes in V2:
* Added dcdc3, dcdc5, dcdc6 nodes.

arch/arm/boot/dts/am43x-epos-evm.dts | 59 ++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)

diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 90098f9..f1ee7495 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -327,6 +327,65 @@
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
+ clock-frequency = <400000>;
+
+ tps65218: tps65218@24 {
+ reg = <0x24>;
+ compatible = "ti,tps65218";
+ interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
+ interrupt-parent = <&gic>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ dcdc1: regulator-dcdc1 {
+ compatible = "ti,tps65218-dcdc1";
+ regulator-name = "vdd_core";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <1144000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc2: regulator-dcdc2 {
+ compatible = "ti,tps65218-dcdc2";
+ regulator-name = "vdd_mpu";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <1378000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc3: regulator-dcdc3 {
+ compatible = "ti,tps65218-dcdc3";
+ regulator-name = "vdcdc3";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc5: regulator-dcdc5 {
+ compatible = "ti,tps65218-dcdc5";
+ regulator-name = "v1_0bat";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ };
+
+ dcdc6: regulator-dcdc6 {
+ compatible = "ti,tps65218-dcdc6";
+ regulator-name = "v1_8bat";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ ldo1: regulator-ldo1 {
+ compatible = "ti,tps65218-ldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };

at24@50 {
compatible = "at24,24c256";
--
1.7.9.5

2014-07-08 13:37:31

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2 1/7] mfd: Add DT bindings for tps65218 PMIC

On Tue, Jul 08, 2014 at 03:46:31PM +0530, Keerthy wrote:
> Add DT bindings for tps65218 PMIC
>
> Signed-off-by: Keerthy <[email protected]>

Reviewed-by: Felipe Balbi <[email protected]>

> ---
>
> Changes in V2:
> * Added dcdc3, dcdc5, dcdc6 compatible properties.
>
> Documentation/devicetree/bindings/mfd/tps65218.txt | 89 ++++++++++++++++++++
> 1 file changed, 89 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/tps65218.txt
>
> diff --git a/Documentation/devicetree/bindings/mfd/tps65218.txt b/Documentation/devicetree/bindings/mfd/tps65218.txt
> new file mode 100644
> index 0000000..01ac973
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/tps65218.txt
> @@ -0,0 +1,89 @@
> +Texas Instruments TPS65218 family
> +
> +The TPS65218 are Integrated Power Management Chips.
> +
> +Required properties:
> +- compatible : Must be "ti,tps65218";
> + For Integrated power-management used in AM437x based boards
> +- interrupts : This i2c device has an IRQ line connected to the main SoC
> +- interrupt-controller : Since the tps65218 supports several interrupts
> + internally, it is considered as an interrupt controller cascaded to the
> + SoC one.
> +- #interrupt-cells = <2>;
> +- interrupt-parent : The parent interrupt controller which is gic.
> +
> +Optional node:
> +- TPS65218 PMIC has a number of child nodes. Mainly the regularors and SMPSs.
> +
> +Example:
> +/*
> + * Integrated Power Management Chip
> + */
> +tps65218: tps65218@24 {
> + reg = <0x24>;
> + compatible = "ti,tps65218";
> + interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
> + interrupt-parent = <&gic>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + dcdc1: regulator-dcdc1 {
> + compatible = "ti,tps65218-dcdc1";
> + /* VDD_CORE voltage limits min of OPP50 and max of OPP100 */
> + regulator-name = "vdd_core";
> + regulator-min-microvolt = <912000>;
> + regulator-max-microvolt = <1144000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc2: regulator-dcdc2 {
> + compatible = "ti,tps65218-dcdc2";
> + /* VDD_MPU voltage limits min of OPP50 and max of OPP_NITRO */
> + regulator-name = "vdd_mpu";
> + regulator-min-microvolt = <912000>;
> + regulator-max-microvolt = <1378000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc3: regulator-dcdc3 {
> + compatible = "ti,tps65218-dcdc3";
> + regulator-name = "vdcdc3";
> + regulator-min-microvolt = <1350000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc4: regulator-dcdc4 {
> + compatible = "ti,tps65218-dcdc4";
> + regulator-name = "v3_3d";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc5: regulator-dcdc5 {
> + compatible = "ti,tps65218-dcdc5";
> + regulator-name = "v1_0bat";
> + regulator-min-microvolt = <1000000>;
> + regulator-max-microvolt = <1000000>;
> + };
> +
> + dcdc6: regulator-dcdc6 {
> + compatible = "ti,tps65218-dcdc6";
> + regulator-name = "v1_8vat";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + };
> +
> + ldo1: regulator-ldo1 {
> + compatible = "ti,tps65218-ldo1";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +};
> --
> 1.7.9.5
>

--
balbi


Attachments:
(No filename) (3.35 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2014-07-08 13:37:54

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2 2/7] regulator: Add DT bindings for tps65218 PMIC regulators.

On Tue, Jul 08, 2014 at 03:46:32PM +0530, Keerthy wrote:
> Add DT bindings for tps65218 PMIC regulators.
>
> Signed-off-by: Keerthy <[email protected]>

Reviewed-by: Felipe Balbi <[email protected]>

> ---
>
> Changes in V2:
> * Added dcdc3, dcdc5, dcdc6 compatible properties.
>
> .../devicetree/bindings/regulator/tps65218.txt | 23 ++++++++++++++++++++
> 1 file changed, 23 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/tps65218.txt
>
> diff --git a/Documentation/devicetree/bindings/regulator/tps65218.txt b/Documentation/devicetree/bindings/regulator/tps65218.txt
> new file mode 100644
> index 0000000..fccc1d2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/tps65218.txt
> @@ -0,0 +1,23 @@
> +TPS65218 family of regulators
> +
> +Required properties:
> +For tps65218 regulators/LDOs
> +- compatible:
> + - "ti,tps65218-dcdc1" for DCDC1
> + - "ti,tps65218-dcdc2" for DCDC2
> + - "ti,tps65218-dcdc3" for DCDC3
> + - "ti,tps65218-dcdc4" for DCDC4
> + - "ti,tps65218-dcdc5" for DCDC5
> + - "ti,tps65218-dcdc6" for DCDC6
> + - "ti,tps65218-ldo1" for LDO1
> +
> +Optional properties:
> +- Any optional property defined in bindings/regulator/regulator.txt
> +
> +Example:
> +
> + xyz: regulator@0 {
> + compatible = "ti,tps65218-dcdc1";
> + regulator-min-microvolt = <1000000>;
> + regulator-max-microvolt = <3000000>;
> + };
> --
> 1.7.9.5
>

--
balbi


Attachments:
(No filename) (1.40 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2014-07-08 13:38:46

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2 3/7] ARM: dts: AM43x: Add TPS65218 device tree nodes

On Tue, Jul 08, 2014 at 03:46:33PM +0530, Keerthy wrote:
> Add TPS65218 device tree nodes. i2c clock frequency setting
> also added as part of tps65218 nodes addition. As i2c clock
> enabling is required.
>
> Signed-off-by: Keerthy <[email protected]>
> ---
>
> Changes in V2:
> * Added dcdc3, dcdc5, dcdc6 nodes.

It might be worth noting that dcdc4 is missing because of a possible
PMIC bug you're dealing with. Other than that:

Reviewed-by: Felipe Balbi <[email protected]>

> arch/arm/boot/dts/am43x-epos-evm.dts | 59 ++++++++++++++++++++++++++++++++++
> 1 file changed, 59 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
> index 90098f9..f1ee7495 100644
> --- a/arch/arm/boot/dts/am43x-epos-evm.dts
> +++ b/arch/arm/boot/dts/am43x-epos-evm.dts
> @@ -327,6 +327,65 @@
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <&i2c0_pins>;
> + clock-frequency = <400000>;
> +
> + tps65218: tps65218@24 {
> + reg = <0x24>;
> + compatible = "ti,tps65218";
> + interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
> + interrupt-parent = <&gic>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + dcdc1: regulator-dcdc1 {
> + compatible = "ti,tps65218-dcdc1";
> + regulator-name = "vdd_core";
> + regulator-min-microvolt = <912000>;
> + regulator-max-microvolt = <1144000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc2: regulator-dcdc2 {
> + compatible = "ti,tps65218-dcdc2";
> + regulator-name = "vdd_mpu";
> + regulator-min-microvolt = <912000>;
> + regulator-max-microvolt = <1378000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc3: regulator-dcdc3 {
> + compatible = "ti,tps65218-dcdc3";
> + regulator-name = "vdcdc3";
> + regulator-min-microvolt = <1350000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc5: regulator-dcdc5 {
> + compatible = "ti,tps65218-dcdc5";
> + regulator-name = "v1_0bat";
> + regulator-min-microvolt = <1000000>;
> + regulator-max-microvolt = <1000000>;
> + };
> +
> + dcdc6: regulator-dcdc6 {
> + compatible = "ti,tps65218-dcdc6";
> + regulator-name = "v1_8bat";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + };
> +
> + ldo1: regulator-ldo1 {
> + compatible = "ti,tps65218-ldo1";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + };
>
> at24@50 {
> compatible = "at24,24c256";
> --
> 1.7.9.5
>

--
balbi


Attachments:
(No filename) (2.58 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2014-07-08 13:39:22

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2 5/7] ARM: dts: AM437x: Add TPS65218 device tree nodes

On Tue, Jul 08, 2014 at 03:46:35PM +0530, Keerthy wrote:
> Add TPS65218 device tree nodes. i2c clock frequency setting
> also added as part of tps65218 nodes addition. As i2c clock
> enabling is required.
>
> Signed-off-by: Keerthy <[email protected]>
> ---
>
> Changes in V2:
> *Added dcdc3, dcdc5, dcdc6 nodes

same thing wrt dcdc4

>
> arch/arm/boot/dts/am437x-gp-evm.dts | 58 +++++++++++++++++++++++++++++++++++
> 1 file changed, 58 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
> index 85ca430..f0422c2 100644
> --- a/arch/arm/boot/dts/am437x-gp-evm.dts
> +++ b/arch/arm/boot/dts/am437x-gp-evm.dts
> @@ -260,6 +260,64 @@
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <&i2c0_pins>;
> + clock-frequency = <400000>;
> +
> + tps65218: tps65218@24 {
> + reg = <0x24>;
> + compatible = "ti,tps65218";
> + interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
> + interrupt-parent = <&gic>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + dcdc1: regulator-dcdc1 {
> + compatible = "ti,tps65218-dcdc1";
> + regulator-name = "vdd_core";
> + regulator-min-microvolt = <912000>;
> + regulator-max-microvolt = <1144000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc2: regulator-dcdc2 {
> + compatible = "ti,tps65218-dcdc2";
> + regulator-name = "vdd_mpu";
> + regulator-min-microvolt = <912000>;
> + regulator-max-microvolt = <1378000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + dcdc3: regulator-dcdc3 {
> + compatible = "ti,tps65218-dcdc3";
> + regulator-name = "vdcdc3";
> + regulator-min-microvolt = <1350000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };

add a blank line here

Reviewed-by: Felipe Balbi <[email protected]>


> + dcdc5: regulator-dcdc5 {
> + compatible = "ti,tps65218-dcdc5";
> + regulator-name = "v1_0bat";
> + regulator-min-microvolt = <1000000>;
> + regulator-max-microvolt = <1000000>;
> + };
> +
> + dcdc6: regulator-dcdc6 {
> + compatible = "ti,tps65218-dcdc6";
> + regulator-name = "v1_8bat";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + };
> +
> + ldo1: regulator-ldo1 {
> + compatible = "ti,tps65218-ldo1";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + };
> };
>
> &i2c1 {
> --
> 1.7.9.5
>

--
balbi


Attachments:
(No filename) (2.48 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2014-07-08 13:39:28

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2 6/7] regulator: tps65218: Add get_voltage ops for dcdc5 and dcdc6

On Tue, Jul 08, 2014 at 03:46:36PM +0530, Keerthy wrote:
> Add get_voltage ops for dcdc5 and dcdc6. Both dcdc5 and 6 are fixed regulators
> and hence return min_uV (or max_uV).
>
> Signed-off-by: Keerthy <[email protected]>

Reviewed-by: Felipe Balbi <[email protected]>

> ---
> drivers/regulator/tps65218-regulator.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
> index 9effe48..700c652 100644
> --- a/drivers/regulator/tps65218-regulator.c
> +++ b/drivers/regulator/tps65218-regulator.c
> @@ -151,6 +151,14 @@ static int tps65218_pmic_disable(struct regulator_dev *dev)
> dev->desc->enable_mask, TPS65218_PROTECT_L1);
> }
>
> +static int tps65218_pmic_dcdc56_get_voltage(struct regulator_dev *dev)
> +{
> + struct tps65218 *tps = rdev_get_drvdata(dev);
> + unsigned int rid = rdev_get_id(dev);
> +
> + return tps->info[rid]->min_uV;
> +}
> +
> /* Operations permitted on DCDC1, DCDC2 */
> static struct regulator_ops tps65218_dcdc12_ops = {
> .is_enabled = regulator_is_enabled_regmap,
> @@ -179,6 +187,7 @@ static struct regulator_ops tps65218_dcdc56_pmic_ops = {
> .is_enabled = regulator_is_enabled_regmap,
> .enable = tps65218_pmic_enable,
> .disable = tps65218_pmic_disable,
> + .get_voltage = tps65218_pmic_dcdc56_get_voltage,
> };
>
> static const struct regulator_desc regulators[] = {
> --
> 1.7.9.5
>

--
balbi


Attachments:
(No filename) (1.42 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2014-07-08 13:41:52

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2 4/7] ARM: dts: AM437x: Fix i2c nodes indentation

On Tue, Jul 08, 2014 at 03:46:34PM +0530, Keerthy wrote:
> Fix i2c nodes indentation.
>
> Signed-off-by: Keerthy <[email protected]>

Reviewed-by: Felipe Balbi <[email protected]>

> ---
> arch/arm/boot/dts/am437x-gp-evm.dts | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
> index 003766c..85ca430 100644
> --- a/arch/arm/boot/dts/am437x-gp-evm.dts
> +++ b/arch/arm/boot/dts/am437x-gp-evm.dts
> @@ -257,16 +257,15 @@
> };
>
> &i2c0 {
> - status = "okay";
> - pinctrl-names = "default";
> - pinctrl-0 = <&i2c0_pins>;
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c0_pins>;
> };
>
> &i2c1 {
> - status = "okay";
> - pinctrl-names = "default";
> - pinctrl-0 = <&i2c1_pins>;
> -
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c1_pins>;
> pixcir_ts@5c {
> compatible = "pixcir,pixcir_tangoc";
> pinctrl-names = "default";
> --
> 1.7.9.5
>

--
balbi


Attachments:
(No filename) (1.04 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2014-07-08 14:13:56

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2 6/7] regulator: tps65218: Add get_voltage ops for dcdc5 and dcdc6

On Tue, Jul 08, 2014 at 03:46:36PM +0530, Keerthy wrote:

> +static int tps65218_pmic_dcdc56_get_voltage(struct regulator_dev *dev)
> +{
> + struct tps65218 *tps = rdev_get_drvdata(dev);
> + unsigned int rid = rdev_get_id(dev);
> +
> + return tps->info[rid]->min_uV;
> +}

Set fixed_uV in the descriptor.


Attachments:
(No filename) (305.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-07-09 03:46:34

by Keerthy

[permalink] [raw]
Subject: Re: [PATCH v2 6/7] regulator: tps65218: Add get_voltage ops for dcdc5 and dcdc6

On Tuesday 08 July 2014 07:41 PM, Mark Brown wrote:
> On Tue, Jul 08, 2014 at 03:46:36PM +0530, Keerthy wrote:
>
>> +static int tps65218_pmic_dcdc56_get_voltage(struct regulator_dev *dev)
>> +{
>> + struct tps65218 *tps = rdev_get_drvdata(dev);
>> + unsigned int rid = rdev_get_id(dev);
>> +
>> + return tps->info[rid]->min_uV;
>> +}
> Set fixed_uV in the descriptor.
Okay. I will do that. Thanks for the review.

Regards,
Keerthy