All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: qianfanguijin@163.com
Cc: linux-sunxi@lists.linux.dev, mripard@kernel.org, wens@csie.org,
	jernej.skrabec@gmail.com
Subject: Re: [PATCH 3/3] ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable usb_otg
Date: Thu, 1 Jul 2021 15:37:20 +0100	[thread overview]
Message-ID: <20210701153720.42c1f512@slackpad.fritz.box> (raw)
In-Reply-To: <20210701015009.13985-3-qianfanguijin@163.com>

On Thu,  1 Jul 2021 09:50:09 +0800
qianfanguijin@163.com wrote:

Hi,

> From: qianfan Zhao <qianfanguijin@163.com>
> 
> Enable it.
> 
> Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
> ---
>  arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
> index a6a1087a0c9b..072535b383b5 100644
> --- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
> +++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
> @@ -43,6 +43,7 @@
>  
>  /dts-v1/;
>  #include "sun8i-r40.dtsi"
> +#include "sunxi-common-regulators.dtsi"
>  
>  #include <dt-bindings/gpio/gpio.h>
>  
> @@ -299,6 +300,11 @@
>  	regulator-name = "vdd1v2-sata";
>  };
>  
> +&reg_usb0_vbus {
> +	gpio = <&pio 8 13 GPIO_ACTIVE_HIGH>; /* PI13 */
> +	status = "okay";
> +};

So there is the same USB0-DRVVBUS signal connected to this GPIO, but
also to the AXP's N_VBUSEN line.

Not sure if that means either of them can control the voltage?

> +
>  &tcon_tv0 {
>  	status = "okay";
>  };
> @@ -328,7 +334,15 @@
>  	};
>  };
>  
> +&usb_otg {
> +	dr_mode = "peripheral";

That should be "otg", since we have a working ID pin and can control
VBUS.

> +	status = "okay";
> +};
> +
>  &usbphy {
> +	usb0_id_det-gpios = <&pio 8 4 GPIO_ACTIVE_HIGH>; /* PI4 */
> +	usb0_vbus_det-gpios = <&pio 8 8 GPIO_ACTIVE_HIGH>; /* PH8 */

The comment should say PI8.

I don't have the board, but can at least confirm that the GPIO pins
(PI4, PI8 and PI13) match the schematic.

Cheers,
Andre

> +	usb0_vbus-supply = <&reg_usb0_vbus>;
>  	usb1_vbus-supply = <&reg_vcc5v0>;
>  	usb2_vbus-supply = <&reg_vcc5v0>;
>  	status = "okay";


  reply	other threads:[~2021-07-01 14:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  1:50 [PATCH 1/3] phy-sun4i-usb: Fix sun8i_r40_cfg qianfanguijin
2021-07-01  1:50 ` [PATCH 2/3] ARM: dts: sun8i: r40: Add usb_otg device node qianfanguijin
2021-07-01 14:29   ` Andre Przywara
2021-07-01  1:50 ` [PATCH 3/3] ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable usb_otg qianfanguijin
2021-07-01 14:37   ` Andre Przywara [this message]
2021-07-01 14:47     ` Chen-Yu Tsai
2021-07-02  2:46       ` qianfan
2021-07-02 12:06         ` Maxime Ripard
2021-07-02 12:24           ` Andre Przywara
2021-07-02 12:30             ` Chen-Yu Tsai
2021-07-05  3:50               ` qianfan
2021-07-05  6:20                 ` Chen-Yu Tsai
2021-07-05  6:29                   ` qianfan
2021-07-05 14:20                     ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210701153720.42c1f512@slackpad.fritz.box \
    --to=andre.przywara@arm.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=qianfanguijin@163.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.