linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines
@ 2020-06-15  9:55 Codrin Ciubotariu
  2020-06-15  9:55 ` [PATCH 2/3] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines Codrin Ciubotariu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Codrin Ciubotariu @ 2020-06-15  9:55 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-kernel
  Cc: robh+dt, nicolas.ferre, alexandre.belloni, ludovic.desroches,
	claudiu.beznea, Codrin Ciubotariu

The R1 and R3 lines drive NMOS transistors that are OFF with a low level.
On the SAMA5D2 Xplained board, if the pins corresponding to R1 and R3
have pull-ups enabled, there is an extra 2 x 30uA power consumption.
Use pull-downs for these 2 lines to remove the unnecessary power
consumption.

Fixes: b133ca7a653c ("ARM: dts: at91: sama5d2_xplained: add pin muxing and enable classd")
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
---
 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 055ee53e4773..54d96649da77 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -430,14 +430,18 @@ pinctrl_charger_lbo: charger_lbo {
 					bias-pull-up;
 				};
 
-				pinctrl_classd_default: classd_default {
+				pinctrl_classd_default_pfets: classd_default_pfets {
 					pinmux = <PIN_PB1__CLASSD_R0>,
-						 <PIN_PB2__CLASSD_R1>,
-						 <PIN_PB3__CLASSD_R2>,
-						 <PIN_PB4__CLASSD_R3>;
+						 <PIN_PB3__CLASSD_R2>;
 					bias-pull-up;
 				};
 
+				pinctrl_classd_default_nfets: classd_default_nfets {
+					pinmux = <PIN_PB2__CLASSD_R1>,
+						 <PIN_PB4__CLASSD_R3>;
+					bias-pull-down;
+				};
+
 				pinctrl_flx0_default: flx0_default {
 					pinmux = <PIN_PB28__FLEXCOM0_IO0>,
 						 <PIN_PB29__FLEXCOM0_IO1>;
@@ -614,7 +618,7 @@ pinctrl_pwm0_pwm2_default: pwm0_pwm2_default {
 
 			classd: classd@fc048000 {
 				pinctrl-names = "default";
-				pinctrl-0 = <&pinctrl_classd_default>;
+				pinctrl-0 = <&pinctrl_classd_default_pfets &pinctrl_classd_default_nfets>;
 				atmel,pwm-type = "diff";
 				atmel,non-overlap-time = <10>;
 				status = "okay";
-- 
2.25.1


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

* [PATCH 2/3] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines
  2020-06-15  9:55 [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Codrin Ciubotariu
@ 2020-06-15  9:55 ` Codrin Ciubotariu
  2020-06-17 21:28   ` Alexandre Belloni
  2020-06-15  9:55 ` [PATCH 3/3] Revert "ARM: at91/dt: sama5d2 Xplained: add pdmic node" Codrin Ciubotariu
  2020-06-17 21:27 ` [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Alexandre Belloni
  2 siblings, 1 reply; 7+ messages in thread
From: Codrin Ciubotariu @ 2020-06-15  9:55 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-kernel
  Cc: robh+dt, nicolas.ferre, alexandre.belloni, ludovic.desroches,
	claudiu.beznea, Codrin Ciubotariu

The L1 and L3 lines drive NMOS transistors that are OFF with a low level.
On the SAM9X60 EK board, if the pins corresponding to L1 and L3
have pull-ups enabled, there is an extra 2 x 30uA power consumption.
Use pull-downs for these 2 lines to remove the unnecessary power
consumption.

Fixes: 1e5f532c2737 ("ARM: dts: at91: sam9x60: add device tree for soc and board")
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
---
 arch/arm/boot/dts/at91-sam9x60ek.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
index b484745bf2d4..3b9bb29d9e23 100644
--- a/arch/arm/boot/dts/at91-sam9x60ek.dts
+++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
@@ -470,9 +470,9 @@ classd {
 		pinctrl_classd_default: classd {
 			atmel,pins =
 				<AT91_PIOA 24 AT91_PERIPH_C AT91_PINCTRL_PULL_UP
-				 AT91_PIOA 25 AT91_PERIPH_C AT91_PINCTRL_PULL_UP
+				 AT91_PIOA 25 AT91_PERIPH_C AT91_PINCTRL_PULL_DOWN
 				 AT91_PIOA 26 AT91_PERIPH_C AT91_PINCTRL_PULL_UP
-				 AT91_PIOA 27 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>;
+				 AT91_PIOA 27 AT91_PERIPH_C AT91_PINCTRL_PULL_DOWN>;
 		};
 	};
 
-- 
2.25.1


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

* [PATCH 3/3] Revert "ARM: at91/dt: sama5d2 Xplained: add pdmic node"
  2020-06-15  9:55 [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Codrin Ciubotariu
  2020-06-15  9:55 ` [PATCH 2/3] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines Codrin Ciubotariu
@ 2020-06-15  9:55 ` Codrin Ciubotariu
  2020-06-17 21:34   ` Alexandre Belloni
  2020-06-17 21:27 ` [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Alexandre Belloni
  2 siblings, 1 reply; 7+ messages in thread
From: Codrin Ciubotariu @ 2020-06-15  9:55 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-kernel
  Cc: robh+dt, nicolas.ferre, alexandre.belloni, ludovic.desroches,
	claudiu.beznea, Codrin Ciubotariu

There are no PDM microphones on SAMA5D2 Xplained, to exercize the
PDMIC.

This reverts commit ca6349a8c51f2e3d6f2acdb36431e7d7328261f7.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
---
 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 54d96649da77..c0a255bda477 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -109,16 +109,6 @@ timer1: timer@1 {
 				};
 			};
 
-			pdmic@f8018000 {
-				pinctrl-names = "default";
-				pinctrl-0 = <&pinctrl_pdmic_default>;
-				atmel,model = "PDMIC @ sama5d2_xplained";
-				atmel,mic-min-freq = <1000000>;
-				atmel,mic-max-freq = <3246000>;
-				atmel,mic-offset = <0x0>;
-				status = "okay";
-			};
-
 			uart1: serial@f8020000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_uart1_default>;
@@ -533,12 +523,6 @@ pinctrl_macb0_phy_irq: macb0_phy_irq {
 					bias-disable;
 				};
 
-				pinctrl_pdmic_default: pdmic_default {
-					pinmux = <PIN_PB26__PDMIC_DAT>,
-						<PIN_PB27__PDMIC_CLK>;
-					bias-disable;
-				};
-
 				pinctrl_sdmmc0_default: sdmmc0_default {
 					cmd_data {
 						pinmux = <PIN_PA1__SDMMC0_CMD>,
-- 
2.25.1


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

* Re: [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines
  2020-06-15  9:55 [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Codrin Ciubotariu
  2020-06-15  9:55 ` [PATCH 2/3] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines Codrin Ciubotariu
  2020-06-15  9:55 ` [PATCH 3/3] Revert "ARM: at91/dt: sama5d2 Xplained: add pdmic node" Codrin Ciubotariu
@ 2020-06-17 21:27 ` Alexandre Belloni
  2 siblings, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2020-06-17 21:27 UTC (permalink / raw)
  To: Codrin Ciubotariu
  Cc: devicetree, linux-arm-kernel, linux-kernel, robh+dt,
	nicolas.ferre, ludovic.desroches, claudiu.beznea

On 15/06/2020 12:55:23+0300, Codrin Ciubotariu wrote:
> The R1 and R3 lines drive NMOS transistors that are OFF with a low level.
> On the SAMA5D2 Xplained board, if the pins corresponding to R1 and R3
> have pull-ups enabled, there is an extra 2 x 30uA power consumption.
> Use pull-downs for these 2 lines to remove the unnecessary power
> consumption.
> 
> Fixes: b133ca7a653c ("ARM: dts: at91: sama5d2_xplained: add pin muxing and enable classd")
> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
> ---
>  arch/arm/boot/dts/at91-sama5d2_xplained.dts | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH 2/3] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines
  2020-06-15  9:55 ` [PATCH 2/3] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines Codrin Ciubotariu
@ 2020-06-17 21:28   ` Alexandre Belloni
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2020-06-17 21:28 UTC (permalink / raw)
  To: Codrin Ciubotariu
  Cc: devicetree, linux-arm-kernel, linux-kernel, robh+dt,
	nicolas.ferre, ludovic.desroches, claudiu.beznea

On 15/06/2020 12:55:24+0300, Codrin Ciubotariu wrote:
> The L1 and L3 lines drive NMOS transistors that are OFF with a low level.
> On the SAM9X60 EK board, if the pins corresponding to L1 and L3
> have pull-ups enabled, there is an extra 2 x 30uA power consumption.
> Use pull-downs for these 2 lines to remove the unnecessary power
> consumption.
> 
> Fixes: 1e5f532c2737 ("ARM: dts: at91: sam9x60: add device tree for soc and board")
> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
> ---
>  arch/arm/boot/dts/at91-sam9x60ek.dts | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH 3/3] Revert "ARM: at91/dt: sama5d2 Xplained: add pdmic node"
  2020-06-15  9:55 ` [PATCH 3/3] Revert "ARM: at91/dt: sama5d2 Xplained: add pdmic node" Codrin Ciubotariu
@ 2020-06-17 21:34   ` Alexandre Belloni
  2020-06-18  7:43     ` Codrin.Ciubotariu
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2020-06-17 21:34 UTC (permalink / raw)
  To: Codrin Ciubotariu
  Cc: devicetree, linux-arm-kernel, linux-kernel, robh+dt,
	nicolas.ferre, ludovic.desroches, claudiu.beznea

Hi,

The correct subject line prefix is "ARM: dts: at91:"

On 15/06/2020 12:55:25+0300, Codrin Ciubotariu wrote:
> There are no PDM microphones on SAMA5D2 Xplained, to exercize the
> PDMIC.
> 
> This reverts commit ca6349a8c51f2e3d6f2acdb36431e7d7328261f7.
> 
> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
> ---
>  arch/arm/boot/dts/at91-sama5d2_xplained.dts | 16 ----------------
>  1 file changed, 16 deletions(-)
> 

This patch doesn't apply and I think you'll have to motivate the removal
a bit more because this seems like a change of policy to me.

> diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> index 54d96649da77..c0a255bda477 100644
> --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> @@ -109,16 +109,6 @@ timer1: timer@1 {
>  				};
>  			};
>  
> -			pdmic@f8018000 {
> -				pinctrl-names = "default";
> -				pinctrl-0 = <&pinctrl_pdmic_default>;
> -				atmel,model = "PDMIC @ sama5d2_xplained";
> -				atmel,mic-min-freq = <1000000>;
> -				atmel,mic-max-freq = <3246000>;
> -				atmel,mic-offset = <0x0>;
> -				status = "okay";
> -			};
> -
>  			uart1: serial@f8020000 {
>  				pinctrl-names = "default";
>  				pinctrl-0 = <&pinctrl_uart1_default>;
> @@ -533,12 +523,6 @@ pinctrl_macb0_phy_irq: macb0_phy_irq {
>  					bias-disable;
>  				};
>  
> -				pinctrl_pdmic_default: pdmic_default {
> -					pinmux = <PIN_PB26__PDMIC_DAT>,
> -						<PIN_PB27__PDMIC_CLK>;
> -					bias-disable;
> -				};
> -
>  				pinctrl_sdmmc0_default: sdmmc0_default {
>  					cmd_data {
>  						pinmux = <PIN_PA1__SDMMC0_CMD>,
> -- 
> 2.25.1
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH 3/3] Revert "ARM: at91/dt: sama5d2 Xplained: add pdmic node"
  2020-06-17 21:34   ` Alexandre Belloni
@ 2020-06-18  7:43     ` Codrin.Ciubotariu
  0 siblings, 0 replies; 7+ messages in thread
From: Codrin.Ciubotariu @ 2020-06-18  7:43 UTC (permalink / raw)
  To: alexandre.belloni
  Cc: devicetree, linux-arm-kernel, linux-kernel, robh+dt,
	Nicolas.Ferre, Ludovic.Desroches, Claudiu.Beznea

On 18.06.2020 00:34, Alexandre Belloni wrote:
> Hi,
> 
> The correct subject line prefix is "ARM: dts: at91:"

I just reverted the original patch. I can make it a normal commit if you 
want.

> 
> On 15/06/2020 12:55:25+0300, Codrin Ciubotariu wrote:
>> There are no PDM microphones on SAMA5D2 Xplained, to exercize the
>> PDMIC.
>>
>> This reverts commit ca6349a8c51f2e3d6f2acdb36431e7d7328261f7.
>>
>> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
>> ---
>>   arch/arm/boot/dts/at91-sama5d2_xplained.dts | 16 ----------------
>>   1 file changed, 16 deletions(-)
>>
> 
> This patch doesn't apply and I think you'll have to motivate the removal
> a bit more because this seems like a change of policy to me.

The PDMIC needs PDM microphones to work. sama5d2 xplained doesn't have 
such microphones, so there is no reason to enable PDMIC and take some 
pins since there is no-one using them. Isn't it the policy to enable 
only what is present on a board?

> 
>> diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
>> index 54d96649da77..c0a255bda477 100644
>> --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
>> +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
>> @@ -109,16 +109,6 @@ timer1: timer@1 {
>>                                };
>>                        };
>>
>> -                     pdmic@f8018000 {
>> -                             pinctrl-names = "default";
>> -                             pinctrl-0 = <&pinctrl_pdmic_default>;
>> -                             atmel,model = "PDMIC @ sama5d2_xplained";
>> -                             atmel,mic-min-freq = <1000000>;
>> -                             atmel,mic-max-freq = <3246000>;
>> -                             atmel,mic-offset = <0x0>;
>> -                             status = "okay";
>> -                     };
>> -
>>                        uart1: serial@f8020000 {
>>                                pinctrl-names = "default";
>>                                pinctrl-0 = <&pinctrl_uart1_default>;
>> @@ -533,12 +523,6 @@ pinctrl_macb0_phy_irq: macb0_phy_irq {
>>                                        bias-disable;
>>                                };
>>
>> -                             pinctrl_pdmic_default: pdmic_default {
>> -                                     pinmux = <PIN_PB26__PDMIC_DAT>,
>> -                                             <PIN_PB27__PDMIC_CLK>;
>> -                                     bias-disable;
>> -                             };
>> -
>>                                pinctrl_sdmmc0_default: sdmmc0_default {
>>                                        cmd_data {
>>                                                pinmux = <PIN_PA1__SDMMC0_CMD>,
>> --
>> 2.25.1
>>
> 
> --
> Alexandre Belloni, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> 


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

end of thread, other threads:[~2020-06-18  7:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15  9:55 [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Codrin Ciubotariu
2020-06-15  9:55 ` [PATCH 2/3] ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines Codrin Ciubotariu
2020-06-17 21:28   ` Alexandre Belloni
2020-06-15  9:55 ` [PATCH 3/3] Revert "ARM: at91/dt: sama5d2 Xplained: add pdmic node" Codrin Ciubotariu
2020-06-17 21:34   ` Alexandre Belloni
2020-06-18  7:43     ` Codrin.Ciubotariu
2020-06-17 21:27 ` [PATCH 1/3] ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Alexandre Belloni

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).