linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Qianfan Zhao <qianfanguijin@163.com>
Cc: u-boot@lists.denx.de, Icenowy Zheng <icenowy@aosc.io>,
	Chen-Yu Tsai <wens@csie.org>,
	Jagan Teki <jagan@amarulasolutions.com>,
	linux-sunxi <linux-sunxi@lists.linux.dev>
Subject: Re: [PATCH 3/4] dts: bpi-m2u: Enable USB_OTG by default
Date: Mon, 21 Jun 2021 01:35:07 +0100	[thread overview]
Message-ID: <20210621013507.2efed026@slackpad.fritz.box> (raw)
In-Reply-To: <20210616023326.18135-3-qianfanguijin@163.com>

On Wed, 16 Jun 2021 10:33:25 +0800
qianfanguijin@163.com (qianfanguijin@163.com) wrote:

Hi,

in general this patch looks mostly alright (see below), but this needs
to go through Linux first, since we only sync DTs this way.

Some comments below, for when you send this to Linux:

> From: qianfan Zhao <qianfanguijin@163.com>
> 
> bpi-m2u has a hardware usb_otg, let's enable it in dts.
> 
> Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
> ---
>  arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts |  4 ++++
>  arch/arm/dts/sun8i-r40.dtsi                  | 13 +++++++++++++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
> index a6a1087a0c..828ddc63ae 100644
> --- a/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
> +++ b/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
> @@ -117,6 +117,10 @@
>  	status = "okay";
>  };
>  
> +&usb_otg {

Please keep this sorted alphabetically, so it belongs just above the
usbphy node below.
And please put the dr_mode property here (even though U-Boot ignores
this, AFAIK).
Also we would need the USB-ID and power supply in the PHY node
below, compare other DTs with a micro-USB socket and proper VBUS
support.

> +	status = "okay";
> +};
> +
>  &ehci1 {
>  	status = "okay";
>  };
> diff --git a/arch/arm/dts/sun8i-r40.dtsi b/arch/arm/dts/sun8i-r40.dtsi
> index d5ad3b9efd..7c7a9cd9f8 100644
> --- a/arch/arm/dts/sun8i-r40.dtsi
> +++ b/arch/arm/dts/sun8i-r40.dtsi
> @@ -363,6 +363,19 @@
>  			#size-cells = <0>;
>  		};
>  
> +		usb_otg: usb@1c13000 {
> +			compatible = "allwinner,sun8i-r40-musb";

Since this is fully compatible with the H3, please use:
			compatible = "allwinner,sun8i-r40-musb",
				     "allwinner,sun8i-h3-musb";

This way we won't need code changes to the MUSB driver.

The rest (address, interrupt) look alright.

Cheers,
Andre


> +			reg = <0x01c13000 0x0400>;
> +			clocks = <&ccu CLK_BUS_OTG>;
> +			resets = <&ccu RST_BUS_OTG>;
> +			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "mc";
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			extcon = <&usbphy 0>;
> +			status = "disabled";
> +		};
> +
>  		usbphy: phy@1c13400 {
>  			compatible = "allwinner,sun8i-r40-usb-phy";
>  			reg = <0x01c13400 0x14>,


  parent reply	other threads:[~2021-06-21  0:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210616023326.18135-1-qianfanguijin@163.com>
2021-06-21  0:33 ` [PATCH 1/4] phy-sun4i-usb: Fix sun8i_r40_cfg Andre Przywara
2021-06-30  6:48   ` qianfan
     [not found] ` <20210616023326.18135-2-qianfanguijin@163.com>
2021-06-21  0:34   ` [PATCH 2/4] sunxi_musb: Add musb configurations of sun8i-r40 Andre Przywara
     [not found] ` <20210616023326.18135-3-qianfanguijin@163.com>
2021-06-21  0:35   ` Andre Przywara [this message]
     [not found] ` <20210616023326.18135-4-qianfanguijin@163.com>
2021-06-21  0:35   ` [PATCH 4/4] sunxi: defconfig: bpi-m2u: Enable usb gadget and ums by default Andre Przywara

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=20210621013507.2efed026@slackpad.fritz.box \
    --to=andre.przywara@arm.com \
    --cc=icenowy@aosc.io \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=qianfanguijin@163.com \
    --cc=u-boot@lists.denx.de \
    --cc=wens@csie.org \
    --subject='Re: [PATCH 3/4] dts: bpi-m2u: Enable USB_OTG by default' \
    /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

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).