diff mbox

[3/3] ARM: at91: dt: at91sam9n12ek: enable udp

Message ID 1423472572-19824-4-git-send-email-voice.shen@atmel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bo Shen Feb. 9, 2015, 9:02 a.m. UTC
Enable usb device port on at91sam9n12ek board.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---

 arch/arm/boot/dts/at91sam9n12ek.dts | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Sylvain Rochet Feb. 9, 2015, 10:04 a.m. UTC | #1
Hello Bo,

On Mon, Feb 09, 2015 at 05:02:52PM +0800, Bo Shen wrote:
> Enable usb device port on at91sam9n12ek board.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
> 
>  arch/arm/boot/dts/at91sam9n12ek.dts | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
> index 13bb24e..3e572e5 100644
> --- a/arch/arm/boot/dts/at91sam9n12ek.dts
> +++ b/arch/arm/boot/dts/at91sam9n12ek.dts
> @@ -120,6 +120,11 @@
>  				};
>  			};
>  
> +			usb1: gadget@f803c000 {
> +				atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
> +				status = "okay";
> +			};
> +

There is an external resistor divider on PB16, acting like a pull-down 
(R22+R23). PB16 reset state is input, pull-up, schmitt trigger, you need 
to disable the pull-up in pinctrl this way:

usb1: gadget@f803c000 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_board_usb1>;
	…
}

pinctrl … {
	usb1 {
		pinctrl_board_usb1: usb1-board {
			atmel,pins = <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;    /* PB16, no pull up and deglitch */
		};
	};
};


Sylvain
Bo Shen Feb. 9, 2015, 10:23 a.m. UTC | #2
Hi Sylvain,

On 02/09/2015 06:04 PM, Sylvain Rochet wrote:
> Hello Bo,
>
> On Mon, Feb 09, 2015 at 05:02:52PM +0800, Bo Shen wrote:
>> Enable usb device port on at91sam9n12ek board.
>>
>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> ---
>>
>>   arch/arm/boot/dts/at91sam9n12ek.dts | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
>> index 13bb24e..3e572e5 100644
>> --- a/arch/arm/boot/dts/at91sam9n12ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9n12ek.dts
>> @@ -120,6 +120,11 @@
>>   				};
>>   			};
>>
>> +			usb1: gadget@f803c000 {
>> +				atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
>> +				status = "okay";
>> +			};
>> +
>
> There is an external resistor divider on PB16, acting like a pull-down
> (R22+R23). PB16 reset state is input, pull-up, schmitt trigger, you need
> to disable the pull-up in pinctrl this way:
>
> usb1: gadget@f803c000 {
> 	pinctrl-names = "default";
> 	pinctrl-0 = <&pinctrl_board_usb1>;
> 	…
> }
>
> pinctrl … {
> 	usb1 {
> 		pinctrl_board_usb1: usb1-board {
> 			atmel,pins = <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;    /* PB16, no pull up and deglitch */
> 		};
> 	};
> };

Thanks.

I will add it in next version.

>
> Sylvain
>

Best Regards,
Bo Shen
diff mbox

Patch

diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 13bb24e..3e572e5 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -120,6 +120,11 @@ 
 				};
 			};
 
+			usb1: gadget@f803c000 {
+				atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
+				status = "okay";
+			};
+
 			watchdog@fffffe40 {
 				status = "okay";
 			};