linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend
@ 2019-03-06 14:03 Adam Ford
  2019-03-06 14:04 ` [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start Adam Ford
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Adam Ford @ 2019-03-06 14:03 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Adam Ford, Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

The LCD power sequencer is very finicky.  The backlight cannot
be driven until after the sequencer is done.  Until now, the
regulators were marked with 'regulator-always-on' to make sure
it came up before the backlight.  This patch allows the LCD
regulators to power down and prevent the backlight from being
used again until the sequencer is ready.  This reduces
standby power consumption by ~100mW.

Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic
PD i.MX6QD EVM")

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/boot/dts/imx6q-logicpd.dts b/arch/arm/boot/dts/imx6q-logicpd.dts
index 45eb0b7f75f8..d96ae54be338 100644
--- a/arch/arm/boot/dts/imx6q-logicpd.dts
+++ b/arch/arm/boot/dts/imx6q-logicpd.dts
@@ -21,6 +21,8 @@
 
 	panel-lvds0 {
 		compatible = "okaya,rs800480t-7x0gp";
+		power-supply = <&reg_lcd_reset>;
+		backlight = <&backlight>;
 
 		port {
 			panel_in_lvds0: endpoint {
@@ -38,7 +40,6 @@
 		regulator-max-microvolt = <3300000>;
 		gpio = <&gpio4 17 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
-		regulator-always-on;
 		vin-supply = <&reg_3v3>;
 		startup-delay-us = <500000>;
 	};
@@ -52,7 +53,6 @@
 		regulator-max-microvolt = <3300000>;
 		gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
-		regulator-always-on;
 		vin-supply = <&reg_lcd>;
 	};
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start
  2019-03-06 14:03 [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend Adam Ford
@ 2019-03-06 14:04 ` Adam Ford
  2019-03-20 12:44   ` Shawn Guo
  2019-03-06 14:04 ` [PATCH 3/3] ARM: DTS: imx6q-logicpd: Fix Analog audio capture Adam Ford
  2019-03-20 12:42 ` [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend Shawn Guo
  2 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2019-03-06 14:04 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Adam Ford, Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

The main 3.3V regulator sources a series of additional regulators.
This patch adds a small delay, so when the 3.3V regulator comes
on it delays a bit before the subsequent regulators can come on.
This reduces the inrush current a bit on the external DC power
supply.

Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic PD
i.MX6QD EVM")

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
index fb01fa6e4224..e31b6923cb72 100644
--- a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
+++ b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
@@ -99,6 +99,7 @@
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 		gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <70000>;
 		enable-active-high;
 		regulator-always-on;
 	};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ARM: DTS: imx6q-logicpd: Fix Analog audio capture
  2019-03-06 14:03 [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend Adam Ford
  2019-03-06 14:04 ` [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start Adam Ford
@ 2019-03-06 14:04 ` Adam Ford
  2019-03-20 12:46   ` Shawn Guo
  2019-03-20 12:42 ` [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend Shawn Guo
  2 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2019-03-06 14:04 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Adam Ford, Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

The original submission had functional audio out and was based
on reviewing other boards using the same wm8962 codec. However,
the Logic PD board uses an analog microphone which was being
disabled for a digital mic.  This patch corrects that and
explicitly sets the gpio-cfg pins all to 0x0000 which allows the
analog microphone to capture audio.

Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic PD
i.MX6QD EVM")

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
index e31b6923cb72..db6b5b900826 100644
--- a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
+++ b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
@@ -248,9 +248,9 @@
 		gpio-cfg = <
 			0x0000 /* 0:Default */
 			0x0000 /* 1:Default */
-			0x0013 /* 2:FN_DMICCLK */
+			0x0000 /* 2:FN_DMICCLK */
 			0x0000 /* 3:Default */
-			0x8014 /* 4:FN_DMICCDAT */
+			0x0000 /* 4:FN_DMICCDAT */
 			0x0000 /* 5:Default */
 		>;
 	};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend
  2019-03-06 14:03 [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend Adam Ford
  2019-03-06 14:04 ` [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start Adam Ford
  2019-03-06 14:04 ` [PATCH 3/3] ARM: DTS: imx6q-logicpd: Fix Analog audio capture Adam Ford
@ 2019-03-20 12:42 ` Shawn Guo
  2 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2019-03-20 12:42 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

On Wed, Mar 06, 2019 at 08:03:59AM -0600, Adam Ford wrote:
> The LCD power sequencer is very finicky.  The backlight cannot
> be driven until after the sequencer is done.  Until now, the
> regulators were marked with 'regulator-always-on' to make sure
> it came up before the backlight.  This patch allows the LCD
> regulators to power down and prevent the backlight from being
> used again until the sequencer is ready.  This reduces
> standby power consumption by ~100mW.
> 
> Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic
> PD i.MX6QD EVM")

Fixes tag is more for regressions or serious bugs.  It looks the patch
is more like an improvement though.

Shawn

> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm/boot/dts/imx6q-logicpd.dts b/arch/arm/boot/dts/imx6q-logicpd.dts
> index 45eb0b7f75f8..d96ae54be338 100644
> --- a/arch/arm/boot/dts/imx6q-logicpd.dts
> +++ b/arch/arm/boot/dts/imx6q-logicpd.dts
> @@ -21,6 +21,8 @@
>  
>  	panel-lvds0 {
>  		compatible = "okaya,rs800480t-7x0gp";
> +		power-supply = <&reg_lcd_reset>;
> +		backlight = <&backlight>;
>  
>  		port {
>  			panel_in_lvds0: endpoint {
> @@ -38,7 +40,6 @@
>  		regulator-max-microvolt = <3300000>;
>  		gpio = <&gpio4 17 GPIO_ACTIVE_HIGH>;
>  		enable-active-high;
> -		regulator-always-on;
>  		vin-supply = <&reg_3v3>;
>  		startup-delay-us = <500000>;
>  	};
> @@ -52,7 +53,6 @@
>  		regulator-max-microvolt = <3300000>;
>  		gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
>  		enable-active-high;
> -		regulator-always-on;
>  		vin-supply = <&reg_lcd>;
>  	};
>  };
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start
  2019-03-06 14:04 ` [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start Adam Ford
@ 2019-03-20 12:44   ` Shawn Guo
  2019-03-20 13:41     ` Adam Ford
  0 siblings, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2019-03-20 12:44 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

On Wed, Mar 06, 2019 at 08:04:00AM -0600, Adam Ford wrote:
> The main 3.3V regulator sources a series of additional regulators.
> This patch adds a small delay, so when the 3.3V regulator comes
> on it delays a bit before the subsequent regulators can come on.
> This reduces the inrush current a bit on the external DC power
> supply.
> 
> Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic PD
> i.MX6QD EVM")

Same comment as patch #1.

> 
> Signed-off-by: Adam Ford <aford173@gmail.com>

To match the convention, the 'DTS' in subject prefix should be
lowercase.

Shawn

> 
> diff --git a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> index fb01fa6e4224..e31b6923cb72 100644
> --- a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> +++ b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> @@ -99,6 +99,7 @@
>  		regulator-min-microvolt = <3300000>;
>  		regulator-max-microvolt = <3300000>;
>  		gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
> +		startup-delay-us = <70000>;
>  		enable-active-high;
>  		regulator-always-on;
>  	};
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] ARM: DTS: imx6q-logicpd: Fix Analog audio capture
  2019-03-06 14:04 ` [PATCH 3/3] ARM: DTS: imx6q-logicpd: Fix Analog audio capture Adam Ford
@ 2019-03-20 12:46   ` Shawn Guo
  0 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2019-03-20 12:46 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

On Wed, Mar 06, 2019 at 08:04:01AM -0600, Adam Ford wrote:
> The original submission had functional audio out and was based
> on reviewing other boards using the same wm8962 codec. However,
> the Logic PD board uses an analog microphone which was being
> disabled for a digital mic.  This patch corrects that and
> explicitly sets the gpio-cfg pins all to 0x0000 which allows the
> analog microphone to capture audio.
> 
> Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic PD
> i.MX6QD EVM")

If audio capture has never worked, the change is more like a "new feature"
than critical fix.

Shawn

> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> index e31b6923cb72..db6b5b900826 100644
> --- a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> +++ b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> @@ -248,9 +248,9 @@
>  		gpio-cfg = <
>  			0x0000 /* 0:Default */
>  			0x0000 /* 1:Default */
> -			0x0013 /* 2:FN_DMICCLK */
> +			0x0000 /* 2:FN_DMICCLK */
>  			0x0000 /* 3:Default */
> -			0x8014 /* 4:FN_DMICCDAT */
> +			0x0000 /* 4:FN_DMICCDAT */
>  			0x0000 /* 5:Default */
>  		>;
>  	};
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start
  2019-03-20 12:44   ` Shawn Guo
@ 2019-03-20 13:41     ` Adam Ford
  2019-03-20 14:57       ` Shawn Guo
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2019-03-20 13:41 UTC (permalink / raw)
  To: Shawn Guo
  Cc: arm-soc, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, Linux Kernel Mailing List

On Wed, Mar 20, 2019 at 7:45 AM Shawn Guo <shawnguo@kernel.org> wrote:
>
> On Wed, Mar 06, 2019 at 08:04:00AM -0600, Adam Ford wrote:
> > The main 3.3V regulator sources a series of additional regulators.
> > This patch adds a small delay, so when the 3.3V regulator comes
> > on it delays a bit before the subsequent regulators can come on.
> > This reduces the inrush current a bit on the external DC power
> > supply.
> >
> > Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic PD
> > i.MX6QD EVM")
>
> Same comment as patch #1.

The sourcing regulator occasionally cuts out because the inrush is so
high.  I would argue that preventing a hardware issue like that would
be a 'fix' and if it helps, I could add that to the description.

>
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> To match the convention, the 'DTS' in subject prefix should be
> lowercase.

I will fix in V2.

>
> Shawn

adam
>
> >
> > diff --git a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> > index fb01fa6e4224..e31b6923cb72 100644
> > --- a/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> > +++ b/arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
> > @@ -99,6 +99,7 @@
> >               regulator-min-microvolt = <3300000>;
> >               regulator-max-microvolt = <3300000>;
> >               gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
> > +             startup-delay-us = <70000>;
> >               enable-active-high;
> >               regulator-always-on;
> >       };
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start
  2019-03-20 13:41     ` Adam Ford
@ 2019-03-20 14:57       ` Shawn Guo
  0 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2019-03-20 14:57 UTC (permalink / raw)
  To: Adam Ford
  Cc: arm-soc, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, Linux Kernel Mailing List

On Wed, Mar 20, 2019 at 08:41:27AM -0500, Adam Ford wrote:
> On Wed, Mar 20, 2019 at 7:45 AM Shawn Guo <shawnguo@kernel.org> wrote:
> >
> > On Wed, Mar 06, 2019 at 08:04:00AM -0600, Adam Ford wrote:
> > > The main 3.3V regulator sources a series of additional regulators.
> > > This patch adds a small delay, so when the 3.3V regulator comes
> > > on it delays a bit before the subsequent regulators can come on.
> > > This reduces the inrush current a bit on the external DC power
> > > supply.
> > >
> > > Fixes: 1c207f911fe9 ("ARM: dts: imx: Add support for Logic PD
> > > i.MX6QD EVM")
> >
> > Same comment as patch #1.
> 
> The sourcing regulator occasionally cuts out because the inrush is so
> high.  I would argue that preventing a hardware issue like that would
> be a 'fix' and if it helps, I could add that to the description.

Yes, if you would like to get it in as a fix, please elaborate the real
world issue it fixes.

Shawn

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-20 14:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 14:03 [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend Adam Ford
2019-03-06 14:04 ` [PATCH 2/3] ARM: DTS: imx6q-logicpd: Reduce inrush current on start Adam Ford
2019-03-20 12:44   ` Shawn Guo
2019-03-20 13:41     ` Adam Ford
2019-03-20 14:57       ` Shawn Guo
2019-03-06 14:04 ` [PATCH 3/3] ARM: DTS: imx6q-logicpd: Fix Analog audio capture Adam Ford
2019-03-20 12:46   ` Shawn Guo
2019-03-20 12:42 ` [PATCH 1/3] ARM: dts: imx6q-logicpd: Shutdown LCD regulator during suspend Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).