linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: dts: imx51: Fix USB PHY duplicate unit-address
Date: Tue, 3 Jul 2018 14:09:53 +0800	[thread overview]
Message-ID: <20180703060951.GF4348@dragon> (raw)
In-Reply-To: <1530211296-24591-1-git-send-email-festevam@gmail.com>

On Thu, Jun 28, 2018 at 03:41:36PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> Currently the following DTC warnings are seen with W=1:
> 
> arch/arm/boot/dts/imx51-babbage.dtb: Warning (unique_unit_address): /usbphy/usbphy at 0: duplicate unit-address (also used in node /usbphy/usbh1phy at 0)
> arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dtb: Warning (unique_unit_address): /usbphy/usbphy at 0: duplicate unit-address (also used in node /usbphy/usbh1phy at 0)
> 
> Fix it by moving the USB PHY nodes outside of simple-bus and drop the
> unneeded unit-address, which matches the bindings documentation
> at Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Changes since v1:
> - Make it a single patch including the imx51.dtsi change (Shawn)
> 
>  arch/arm/boot/dts/imx51-babbage.dts                 | 21 +++++++--------------
>  .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts   | 19 ++++++-------------
>  arch/arm/boot/dts/imx51.dtsi                        | 17 +++++------------
>  3 files changed, 18 insertions(+), 39 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
> index b8ca73d..de46906 100644
> --- a/arch/arm/boot/dts/imx51-babbage.dts
> +++ b/arch/arm/boot/dts/imx51-babbage.dts
> @@ -170,20 +170,13 @@
>  		mux-ext-port = <3>;
>  	};
>  
> -	usbphy {
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -		compatible = "simple-bus";
> -
> -		usbh1phy: usbh1phy at 0 {
> -			compatible = "usb-nop-xceiv";
> -			reg = <0>;
> -			clocks = <&clk_usb>;
> -			clock-names = "main_clk";
> -			reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
> -			vcc-supply = <&vusb_reg>;
> -			#phy-cells = <0>;
> -		};
> +	usbh1phy: usbh1phy1 {

usbh1phy1 ...

> +		compatible = "usb-nop-xceiv";
> +		clocks = <&clk_usb>;
> +		clock-names = "main_clk";
> +		reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
> +		vcc-supply = <&vusb_reg>;
> +		#phy-cells = <0>;
>  	};
>  };
>  
> diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
> index b3d952f..2320464 100644
> --- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
> +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
> @@ -83,19 +83,12 @@
>  		fsl,mux-ext-port = <3>;
>  	};
>  
> -	usbphy {
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -		compatible = "simple-bus";
> -
> -		usbh1phy: usbh1phy at 0 {
> -			compatible = "usb-nop-xceiv";
> -			reg = <0>;
> -			clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
> -			clock-names = "main_clk";
> -			clock-frequency = <19200000>;
> -			#phy-cells = <0>;
> -		};
> +	usbh1phy: usbh1phy {

... usbh1phy?  Can we name the usbphy nodes a bit more consistent?  I
would even suggest to name them in the same way as usbphy0 in
i.mx51.dtsi.  That said, usbphy1 should just work?

Shawn

> +		compatible = "usb-nop-xceiv";
> +		clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
> +		clock-names = "main_clk";
> +		clock-frequency = <19200000>;
> +		#phy-cells = <0>;
>  	};
>  };
>  
> diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
> index fe01b89..89520c1 100644
> --- a/arch/arm/boot/dts/imx51.dtsi
> +++ b/arch/arm/boot/dts/imx51.dtsi
> @@ -93,18 +93,11 @@
>  		};
>  	};
>  
> -	usbphy {
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -		compatible = "simple-bus";
> -
> -		usbphy0: usbphy at 0 {
> -			compatible = "usb-nop-xceiv";
> -			reg = <0>;
> -			clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
> -			clock-names = "main_clk";
> -			#phy-cells = <0>;
> -		};
> +	usbphy0: usbphy0 {
> +		compatible = "usb-nop-xceiv";
> +		clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
> +		clock-names = "main_clk";
> +		#phy-cells = <0>;
>  	};
>  
>  	display-subsystem {
> -- 
> 2.7.4
> 

      reply	other threads:[~2018-07-03  6:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 18:41 [PATCH v2] ARM: dts: imx51: Fix USB PHY duplicate unit-address Fabio Estevam
2018-07-03  6:09 ` Shawn Guo [this message]

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=20180703060951.GF4348@dragon \
    --to=shawnguo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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 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).