diff mbox

[2/3] ARM: dts: imx53-qsb: Make DA9053 regulator functional

Message ID 1348702057-2351-2-git-send-email-festevam@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Sept. 26, 2012, 11:27 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Setup the GPIO7_11 pin as interrupt to the DA9053 and also rename the regulator nodes
so that they match with the datasheet.

This allows probing of DA9053 to succeed.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/boot/dts/imx53-qsb.dts |   54 ++++++++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 18 deletions(-)

Comments

Marek Vasut Sept. 27, 2012, midnight UTC | #1
Dear Fabio Estevam,

[...]

> +					interrupt-parent = <&gpio7>;
> +					interrupts = <11 0x8>; /* low-level 
active IRQ at GPIO7_11 */

You mean active-low ? :-)

[...]

What was the conclusion on over-using regulator-always-on ?

Best regards,
Marek Vasut
Fabio Estevam Sept. 27, 2012, 12:12 a.m. UTC | #2
Hi Marek,

On Wed, Sep 26, 2012 at 9:00 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Fabio Estevam,
>
> [...]
>
>> +                                     interrupt-parent = <&gpio7>;
>> +                                     interrupts = <11 0x8>; /* low-level
> active IRQ at GPIO7_11 */
>
> You mean active-low ? :-)

Actually I meant 'active low level-sensitive':

From Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt:

 The second cell bits[3:0] is used to specify trigger type and level flags:
      1 = low-to-high edge triggered.
      2 = high-to-low edge triggered.
      4 = active high level-sensitive.
      8 = active low level-sensitive

> What was the conclusion on over-using regulator-always-on ?

I will be glad to get some suggestions about this.

With the original code the regulators were getting disabled, which
caused some key power supplies to be removed and then system died.

Looking at the mx53qsb/DA9053 board schematics I cannot see any of
these supplies that can be turned-off, and that's why I kept the
'always-on' flag.

Regards,

Fabio Estevam
Marek Vasut Sept. 27, 2012, 12:29 a.m. UTC | #3
Dear Fabio Estevam,

> Hi Marek,
> 
> On Wed, Sep 26, 2012 at 9:00 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Fabio Estevam,
> > 
> > [...]
> > 
> >> +                                     interrupt-parent = <&gpio7>;
> >> +                                     interrupts = <11 0x8>; /*
> >> low-level
> > 
> > active IRQ at GPIO7_11 */
> > 
> > You mean active-low ? :-)
> 
> Actually I meant 'active low level-sensitive':
> 
> From Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt:
> 
>  The second cell bits[3:0] is used to specify trigger type and level flags:
>       1 = low-to-high edge triggered.
>       2 = high-to-low edge triggered.
>       4 = active high level-sensitive.
>       8 = active low level-sensitive

Thank you, I need to update my knowledge on the imx v7 :)

> > What was the conclusion on over-using regulator-always-on ?
> 
> I will be glad to get some suggestions about this.
> 
> With the original code the regulators were getting disabled, which
> caused some key power supplies to be removed and then system died.
> 
> Looking at the mx53qsb/DA9053 board schematics I cannot see any of
> these supplies that can be turned-off, and that's why I kept the
> 'always-on' flag.

I agree, let's see what Mark has to say. I believe your approach is valid.

> Regards,
> 
> Fabio Estevam

Best regards,
Marek Vasut
Mark Brown Sept. 27, 2012, 4:18 p.m. UTC | #4
On Thu, Sep 27, 2012 at 02:29:54AM +0200, Marek Vasut wrote:
> Dear Fabio Estevam,

> > Looking at the mx53qsb/DA9053 board schematics I cannot see any of
> > these supplies that can be turned-off, and that's why I kept the
> > 'always-on' flag.

> I agree, let's see what Mark has to say. I believe your approach is valid.

Sorry, I'm missing some context on the discussion here so I'm not usre
what the question is.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx53-qsb.dts b/arch/arm/boot/dts/imx53-qsb.dts
index 5bae4c7..7be2e82 100644
--- a/arch/arm/boot/dts/imx53-qsb.dts
+++ b/arch/arm/boot/dts/imx53-qsb.dts
@@ -60,6 +60,7 @@ 
 							697  0x80000000	/* MX53_PAD_EIM_DA12__GPIO3_12 */
 							701  0x80000000	/* MX53_PAD_EIM_DA13__GPIO3_13 */
 							868  0x80000000	/* MX53_PAD_PATA_DA_0__GPIO7_6 */
+							1149 0x80000000 /* MX53_PAD_GPIO_16__GPIO7_11 */
 						>;
 					};
 
@@ -106,76 +107,93 @@ 
 				pmic: dialog@48 {
 					compatible = "dlg,da9053-aa", "dlg,da9052";
 					reg = <0x48>;
+					interrupt-parent = <&gpio7>;
+					interrupts = <11 0x8>; /* low-level active IRQ at GPIO7_11 */
 
 					regulators {
-						buck0 {
+						buck1_reg: buck1 {
 							regulator-min-microvolt = <500000>;
 							regulator-max-microvolt = <2075000>;
+							regulator-always-on;
 						};
 
-						buck1 {
+						buck2_reg: buck2 {
 							regulator-min-microvolt = <500000>;
 							regulator-max-microvolt = <2075000>;
+							regulator-always-on;
 						};
 
-						buck2 {
+						buck3_reg: buck3 {
 							regulator-min-microvolt = <925000>;
 					                regulator-max-microvolt = <2500000>;
+							regulator-always-on;
 						};
 
-						buck3 {
+						buck4_reg: buck4 {
 							regulator-min-microvolt = <925000>;
 					                regulator-max-microvolt = <2500000>;
+							regulator-always-on;
 						};
 
-						ldo4 {
+						ldo1_reg: ldo1 {
 							regulator-min-microvolt = <600000>;
 							regulator-max-microvolt = <1800000>;
+							regulator-boot-on;
+							regulator-always-on;
 						};
 
-						ldo5 {
+						ldo2_reg: ldo2 {
+							regulator-min-microvolt = <600000>;
+							regulator-max-microvolt = <1800000>;
+							regulator-always-on;
+						};
+
+						ldo3_reg: ldo3 {
 							regulator-min-microvolt = <600000>;
 					                regulator-max-microvolt = <1800000>;
+							regulator-always-on;
 						};
 
-						ldo6 {
+						ldo4_reg: ldo4 {
 							regulator-min-microvolt = <1725000>;
 					                regulator-max-microvolt = <3300000>;
+							regulator-always-on;
 						};
 
-						ldo7 {
+						ldo5_reg: ldo5 {
 							regulator-min-microvolt = <1725000>;
 					                regulator-max-microvolt = <3300000>;
+							regulator-always-on;
 						};
 
-						ldo8 {
+						ldo6_reg: ldo6 {
 							regulator-min-microvolt = <1200000>;
 					                regulator-max-microvolt = <3600000>;
+							regulator-always-on;
 						};
 
-						ldo9 {
+						ldo7_reg: ldo7 {
 							regulator-min-microvolt = <1200000>;
 					                regulator-max-microvolt = <3600000>;
+							regulator-always-on;
 						};
 
-						ldo10 {
+						ldo8_reg: ldo8 {
 							regulator-min-microvolt = <1200000>;
 					                regulator-max-microvolt = <3600000>;
+							regulator-always-on;
 						};
 
-						ldo11 {
+						ldo9_reg: ldo9 {
 							regulator-min-microvolt = <1200000>;
 					                regulator-max-microvolt = <3600000>;
+							regulator-always-on;
 						};
 
-						ldo12 {
+						ldo10_reg: ldo10 {
 							regulator-min-microvolt = <1250000>;
 					                regulator-max-microvolt = <3650000>;
-						};
-
-						ldo13 {
-							regulator-min-microvolt = <1200000>;
-					                regulator-max-microvolt = <3600000>;
+							regulator-always-on;
 						};
 					};
 				};