ARM: at91/dt: fixes dbgu pinctrl, set pullup on rx, clear pullup on tx
Subsystems (2)
PATCH 1/1 ARM: at91/dt: fixes dbgu pinctrl, set pullup on rx, clear pullup on tx
Remove pullup on dbgu DTXD signal, it is a push-pull output thus the pullup only increase power consumption while transmitting with no value added.
Add pullup on dbgu DRXD signal, it prevents the DRXD signal to be left floating and so consuming a useless extra amount of power if nothing is externally connected to dbgu.
--- arch/arm/boot/dts/at91rm9200.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9260.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9261.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9263.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- arch/arm/boot/dts/at91sam9n12.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9rl.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9x5.dtsi | 4 ++-- arch/arm/boot/dts/sama5d3.dtsi | 4 ++-- arch/arm/boot/dts/sama5d4.dtsi | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-)
arch/arm/boot/dts/at91rm9200.dtsi +2 -2
@@ -481,8 +481,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA30 periph A */ - AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA31 periph with pullup */ + <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA30 periph A with pullup */ + AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA31 periph */ }; };
arch/arm/boot/dts/at91sam9260.dtsi +2 -2
@@ -412,8 +412,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A */ - AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PB15 periph with pullup */ + <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB14 periph A with pullup */ + AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB15 periph */ }; };
arch/arm/boot/dts/at91sam9261.dtsi +2 -2
@@ -302,8 +302,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE>, - <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; + <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>, + <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; }; };
arch/arm/boot/dts/at91sam9263.dtsi +2 -2
@@ -412,8 +412,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC30 periph A */ - AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC31 periph with pullup */ + <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC30 periph A with pullup */ + AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC31 periph */ }; };
arch/arm/boot/dts/at91sam9g45.dtsi +1 -1
@@ -478,7 +478,7 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A */ + <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB12 periph A with pullup */ AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB13 periph A */ }; };
arch/arm/boot/dts/at91sam9n12.dtsi +2 -2
@@ -500,8 +500,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A */ - AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA10 periph with pullup */ + <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA9 periph A with pullup */ + AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA10 periph */ }; };
arch/arm/boot/dts/at91sam9rl.dtsi +2 -2
@@ -442,8 +442,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>, - <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; + <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>, + <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE>; }; };
arch/arm/boot/dts/at91sam9x5.dtsi +2 -2
@@ -460,8 +460,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A */ - AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA10 periph A with pullup */ + <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA9 periph A with pullup */ + AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA10 periph A */ }; };
arch/arm/boot/dts/sama5d3.dtsi +2 -2
@@ -545,8 +545,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB30 periph A */ - AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PB31 periph A with pullup */ + <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB30 periph A with pullup */ + AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB31 periph A */ }; };
arch/arm/boot/dts/sama5d4.dtsi +2 -2
@@ -1441,8 +1441,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>, /* conflicts with D14 and TDI */ - <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* conflicts with D15 and TDO */ + <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* conflicts with D14 and TDI */ + AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* conflicts with D15 and TDO */ }; };
Signature · 1 line
2.5.1
PATCH 1/1 ARM: at91/dt: fixes dbgu pinctrl, set pullup on rx, clear pullup on tx
Hi,
Quoted 27 lines · Sylvain Rochet
Remove pullup on dbgu DTXD signal, it is a push-pull output thus the pullup only increase power consumption while transmitting with no value added.
Add pullup on dbgu DRXD signal, it prevents the DRXD signal to be left floating and so consuming a useless extra amount of power if nothing is externally connected to dbgu.
Signed-off-by Sylvain Rochet <[email protected]>--- arch/arm/boot/dts/at91rm9200.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9260.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9261.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9263.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- arch/arm/boot/dts/at91sam9n12.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9rl.dtsi | 4 ++-- arch/arm/boot/dts/at91sam9x5.dtsi | 4 ++-- arch/arm/boot/dts/sama5d3.dtsi | 4 ++-- arch/arm/boot/dts/sama5d4.dtsi | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-)arch/arm/boot/dts/at91rm9200.dtsi +0
-0
arch/arm/boot/dts/at91rm9200.dtsi line 485
Quoted 7 lines
arch/arm/boot/dts/at91rm9200.dtsi +2
-2@@ -481,8 +481,8 @@ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = - <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA30 periph A */ - AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA31 periph with pullup */ + <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA30 periph A with pullup */ + AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA31 periph */
I would prefer dropping those useless (and sometimes wrong) comments when reworking the pinctrl. This is also valid for 2/2
Else, the change makes sense.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 ARM: at91/dt: fixes dbgu pinctrl, set pullup on rx, clear pullup on tx
Hi,
Quoted 11 lines · Alexandre Belloni
Quoted 7 lines · Sylvain Rochet
Remove pullup on dbgu DTXD signal, it is a push-pull output thus the pullup only increase power consumption while transmitting with no value added.
Add pullup on dbgu DRXD signal, it prevents the DRXD signal to be left floating and so consuming a useless extra amount of power if nothing is externally connected to dbgu.
I would prefer dropping those useless (and sometimes wrong) comments when reworking the pinctrl. This is also valid for 2/2
I fully agree, will do.
Quoted 1 line
Else, the change makes sense.
Before sending v2, I noticed something which should be taken into account.
I am lucky enough to currently have on my desk a PCB with almost all SAMA5D31 muxed pins not connected to anything and here are my consumption measurement will "all" muxed pads set to GPIO in multiple configurations of direction and pull-down/pull-up:
Pads are set in a modified boot loader which doesn't do anything after setting the pads, clocks are still enabled as well as MPDDRC and Nandflash, so we are sure that we don't have peripherals on floating wires.
all 160 PIO output, set low, pull up enabled: 76.57 mA all 160 PIO output, set low, pull down enabled: 76.56 mA all 160 PIO output, set high, pull down enabled: 76.72 mA all 160 PIO output, set high, pull up enabled: 76.68 mA all 160 PIO output, set low, pull up and down disabled: 78.22 mA all 160 PIO output, set high, pull up and down disabled: 78.60 mA ( all 160 PIO input, pull up enabled: 77.78 mA )
(that's not exactly 160, that's 160 minus DRXD, DTXD, 4 leds clamped to low, and ALE CLE nandflash pads clamped as well).
Those results are a bit surprising, we would expect a higher power consumption when output value and pull-something do not match of about 160*3.3/70000 = 7.5 mA. We also would expect that disabling pull up and pull down will reduce current consumption on a push pull output instead of increasing. The PIO simplified schematics in datasheet does not have a clue that could explain this behavior.
Atmel guys, could you confirm that a pad currently driven with a push-pull output (either with peripheral or pio) stage automatically disengage any pull up or pull down set and could you confirm that manually disabling pull up and pull down on an output port actually increase (10 ?A/pad) power consumption ?
Sylvain