diff mbox series

[4/4] ARM: dts: at91: sam9g20ek: enable udc vbus gpio pinctrl

Message ID 20221103195730.1681967-5-m.grzeschik@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series ARM: at91: USB Device Port fixes | expand

Commit Message

Michael Grzeschik Nov. 3, 2022, 7:57 p.m. UTC
We set the PIOC to GPIO mode. This way the pin becomes an
input signal will be usable by the controller. Without
this change the udc on the 9g20ek does not work.

Cc: nicolas.ferre@microchip.com
Cc: ludovic.desroches@microchip.com
Cc: alexandre.belloni@bootlin.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Claudiu Beznea Nov. 4, 2022, 8:22 a.m. UTC | #1
On 03.11.2022 21:57, Michael Grzeschik wrote:
> We set the PIOC to GPIO mode. This way the pin becomes an

s/the pin becomes/the pin that becomes ?

> input signal will be usable by the controller. Without> this change the udc on the 9g20ek does not work.
> 
> Cc: nicolas.ferre@microchip.com
> Cc: ludovic.desroches@microchip.com
> Cc: alexandre.belloni@bootlin.com
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

Fixes?

> ---
>  arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
> index 60d61291f34445..1d385fb1c21793 100644
> --- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
> +++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
> @@ -39,6 +39,13 @@ pinctrl_pck0_as_mck: pck0_as_mck {
> 
>                                 };
> 
> +                               usb1 {
> +                                       pinctrl_usb1_vbus_gpio: usb1_vbus_gpio {
> +                                               atmel,pins =
> +                                                       <AT91_PIOC 5 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;   /* PC5 GPIO */
> +                                       };
> +                               };
> +
>                                 mmc0_slot1 {
>                                         pinctrl_board_mmc0_slot1: mmc0_slot1-board {
>                                                 atmel,pins =
> @@ -84,6 +91,9 @@ macb0: ethernet@fffc4000 {
>                         };
> 
>                         usb1: gadget@fffa4000 {
> +                               pinctrl-0 = <
> +                                       &pinctrl_usb1_vbus_gpio>;

You can keep it on a single line.

> +                               pinctrl-names = "default";
>                                 atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
>                                 status = "okay";
>                         };
> --
> 2.30.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index 60d61291f34445..1d385fb1c21793 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -39,6 +39,13 @@  pinctrl_pck0_as_mck: pck0_as_mck {
 
 				};
 
+				usb1 {
+					pinctrl_usb1_vbus_gpio: usb1_vbus_gpio {
+						atmel,pins =
+							<AT91_PIOC 5 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;	/* PC5 GPIO */
+					};
+				};
+
 				mmc0_slot1 {
 					pinctrl_board_mmc0_slot1: mmc0_slot1-board {
 						atmel,pins =
@@ -84,6 +91,9 @@  macb0: ethernet@fffc4000 {
 			};
 
 			usb1: gadget@fffa4000 {
+				pinctrl-0 = <
+					&pinctrl_usb1_vbus_gpio>;
+				pinctrl-names = "default";
 				atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
 				status = "okay";
 			};