* [PATCH] AT91, DT, usb gadget: disable pull-up on vbus-gpio (PB16) to reduce power consumption
@ 2015-01-15 16:00 Sylvain Rochet
2015-01-16 6:22 ` Bo Shen
0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Rochet @ 2015-01-15 16:00 UTC (permalink / raw)
To: linux-arm-kernel
There is an external resistor divider on PB16, acting like a pull-down,
the pull-up increase power consumption and prevent the vbus detect pin
to reach Vss voltage, ~1.5V mesured on my board, it might no even work
if the pull-up is stronger than usual.
Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
---
arch/arm/boot/dts/at91sam9x5ek.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
index 3a9f6fa..f622f96 100644
--- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
@@ -53,6 +53,8 @@
};
usb2: gadget at f803c000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_board_usb2>;
atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
status = "okay";
};
@@ -80,6 +82,13 @@
<AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD14 gpio CD pin pull up and deglitch */
};
};
+
+ usb2 {
+ pinctrl_board_usb2: usb2-board {
+ atmel,pins =
+ <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PB16, no pull up and deglitch */
+ };
+ };
};
spi0: spi at f0000000 {
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH] AT91, DT, usb gadget: disable pull-up on vbus-gpio (PB16) to reduce power consumption
2015-01-15 16:00 [PATCH] AT91, DT, usb gadget: disable pull-up on vbus-gpio (PB16) to reduce power consumption Sylvain Rochet
@ 2015-01-16 6:22 ` Bo Shen
2015-01-16 9:50 ` [PATCH v2] " Sylvain Rochet
0 siblings, 1 reply; 5+ messages in thread
From: Bo Shen @ 2015-01-16 6:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi Sylvain Rochet,
On 01/16/2015 12:00 AM, Sylvain Rochet wrote:
> There is an external resistor divider on PB16, acting like a pull-down,
> the pull-up increase power consumption and prevent the vbus detect pin
> to reach Vss voltage, ~1.5V mesured on my board, it might no even work
> if the pull-up is stronger than usual.
>
> Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Thanks for your patch.
Acked-by: Bo Shen <voice.shen@atmel.com>
> ---
> arch/arm/boot/dts/at91sam9x5ek.dtsi | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
> index 3a9f6fa..f622f96 100644
> --- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
> @@ -53,6 +53,8 @@
> };
>
> usb2: gadget at f803c000 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_board_usb2>;
> atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
> status = "okay";
> };
> @@ -80,6 +82,13 @@
> <AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD14 gpio CD pin pull up and deglitch */
> };
> };
> +
> + usb2 {
> + pinctrl_board_usb2: usb2-board {
> + atmel,pins =
> + <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PB16, no pull up and deglitch */
Nitpick:
I think comments as "PB16 gpio vbus sense, deglitch" will be better. Or
else change "pinctrl_board_usb2" to "pinctrl_usb2_vbus_sense". These
will be help the user easily to understand the function of this pin.
> + };
> + };
> };
>
> spi0: spi at f0000000 {
>
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2] AT91, DT, usb gadget: disable pull-up on vbus-gpio (PB16) to reduce power consumption
2015-01-16 6:22 ` Bo Shen
@ 2015-01-16 9:50 ` Sylvain Rochet
2015-01-16 10:43 ` Alexandre Belloni
0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Rochet @ 2015-01-16 9:50 UTC (permalink / raw)
To: linux-arm-kernel
There is an external resistor divider on PB16, acting like a pull-down,
the pull-up increase power consumption and prevent the vbus detect pin
to reach Vss voltage, ~1.5V mesured on my board, it might not even work
if the pull-up is stronger than usual.
Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
---
Improved GPIO comment, fixed typo in commit summary.
arch/arm/boot/dts/at91sam9x5ek.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
index 3a9f6fa..bd16bd3 100644
--- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
@@ -53,6 +53,8 @@
};
usb2: gadget at f803c000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_board_usb2>;
atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
status = "okay";
};
@@ -80,6 +82,13 @@
<AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD14 gpio CD pin pull up and deglitch */
};
};
+
+ usb2 {
+ pinctrl_board_usb2: usb2-board {
+ atmel,pins =
+ <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PB16 gpio vbus sense, deglitch */
+ };
+ };
};
spi0: spi at f0000000 {
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2] AT91, DT, usb gadget: disable pull-up on vbus-gpio (PB16) to reduce power consumption
2015-01-16 9:50 ` [PATCH v2] " Sylvain Rochet
@ 2015-01-16 10:43 ` Alexandre Belloni
2015-01-16 15:08 ` Nicolas Ferre
0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2015-01-16 10:43 UTC (permalink / raw)
To: linux-arm-kernel
On 16/01/2015 at 10:50:39 +0100, Sylvain Rochet wrote :
> There is an external resistor divider on PB16, acting like a pull-down,
> the pull-up increase power consumption and prevent the vbus detect pin
> to reach Vss voltage, ~1.5V mesured on my board, it might not even work
> if the pull-up is stronger than usual.
>
> Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
You should have added the ack from Bo here too.
> ---
> Improved GPIO comment, fixed typo in commit summary.
>
> arch/arm/boot/dts/at91sam9x5ek.dtsi | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
> index 3a9f6fa..bd16bd3 100644
> --- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
> @@ -53,6 +53,8 @@
> };
>
> usb2: gadget at f803c000 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_board_usb2>;
> atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
> status = "okay";
> };
> @@ -80,6 +82,13 @@
> <AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD14 gpio CD pin pull up and deglitch */
> };
> };
> +
> + usb2 {
> + pinctrl_board_usb2: usb2-board {
> + atmel,pins =
> + <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PB16 gpio vbus sense, deglitch */
> + };
> + };
> };
>
> spi0: spi at f0000000 {
> --
> 2.1.4
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2] AT91, DT, usb gadget: disable pull-up on vbus-gpio (PB16) to reduce power consumption
2015-01-16 10:43 ` Alexandre Belloni
@ 2015-01-16 15:08 ` Nicolas Ferre
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Ferre @ 2015-01-16 15:08 UTC (permalink / raw)
To: linux-arm-kernel
Le 16/01/2015 11:43, Alexandre Belloni a ?crit :
> On 16/01/2015 at 10:50:39 +0100, Sylvain Rochet wrote :
>> There is an external resistor divider on PB16, acting like a pull-down,
>> the pull-up increase power consumption and prevent the vbus detect pin
>> to reach Vss voltage, ~1.5V mesured on my board, it might not even work
>> if the pull-up is stronger than usual.
>>
>> Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>
> You should have added the ack from Bo here too.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Stacked on top of at91-3.20-dt. Thanks for this patch.
Bye,
>> ---
>> Improved GPIO comment, fixed typo in commit summary.
>>
>> arch/arm/boot/dts/at91sam9x5ek.dtsi | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
>> index 3a9f6fa..bd16bd3 100644
>> --- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
>> @@ -53,6 +53,8 @@
>> };
>>
>> usb2: gadget at f803c000 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pinctrl_board_usb2>;
>> atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
>> status = "okay";
>> };
>> @@ -80,6 +82,13 @@
>> <AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD14 gpio CD pin pull up and deglitch */
>> };
>> };
>> +
>> + usb2 {
>> + pinctrl_board_usb2: usb2-board {
>> + atmel,pins =
>> + <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PB16 gpio vbus sense, deglitch */
>> + };
>> + };
>> };
>>
>> spi0: spi at f0000000 {
>> --
>> 2.1.4
>>
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-16 15:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 16:00 [PATCH] AT91, DT, usb gadget: disable pull-up on vbus-gpio (PB16) to reduce power consumption Sylvain Rochet
2015-01-16 6:22 ` Bo Shen
2015-01-16 9:50 ` [PATCH v2] " Sylvain Rochet
2015-01-16 10:43 ` Alexandre Belloni
2015-01-16 15:08 ` Nicolas Ferre
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).