devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alban <albeu-GANU6spQydw@public.gmane.org>
To: Antony Pavlov <antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Aban Bedel <albeu-GANU6spQydw@public.gmane.org>,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
	Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>,
	Wills Wang <wills.wang-EMRzualFZlQ@public.gmane.org>,
	Daniel Schwierzeck
	<daniel.schwierzeck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Frank Rowand
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 06/10] MIPS: dts: qca: ar9132: use short references for uart, usb and spi nodes
Date: Sun, 14 Feb 2016 22:24:45 +0100	[thread overview]
Message-ID: <20160214222445.6eee4365@tock> (raw)
In-Reply-To: <1455400697-29898-7-git-send-email-antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Sun, 14 Feb 2016 00:58:13 +0300
Antony Pavlov <antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Here are some Sascha Hauer's arguments for using aliases in the dts
> files:
> 
>  - using aliases reduces the number of indentations in dts files;
> 
>  - dts files become independent of the layout of the dtsi files
>    (it becomes possible to introduce another bus {} hierarchy between
>    a toplevel bus and the devices when you have to);
> 
>  - less chances for typos. if &i2c2 does not exist you get an error.
>    If instead you duplicate the whole path in the dts file a typo
>    in the path will just create another node.
> 
> Signed-off-by: Antony Pavlov <antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Alban Bedel <albeu-GANU6spQydw@public.gmane.org>
> Cc: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
> Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  arch/mips/boot/dts/qca/ar9132.dtsi               |  6 +-
>  arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | 82 ++++++++++++------------
>  2 files changed, 44 insertions(+), 44 deletions(-)
> 
> diff --git a/arch/mips/boot/dts/qca/ar9132.dtsi b/arch/mips/boot/dts/qca/ar9132.dtsi
> index 3c2ed9e..511cb4d 100644
> --- a/arch/mips/boot/dts/qca/ar9132.dtsi
> +++ b/arch/mips/boot/dts/qca/ar9132.dtsi
> @@ -52,7 +52,7 @@
>  				#qca,ddr-wb-channel-cells = <1>;
>  			};
>  
> -			uart@18020000 {
> +			uart: uart@18020000 {
>  				compatible = "ns8250";
>  				reg = <0x18020000 0x20>;
>  				interrupts = <3>;

Please also add a label for the watchdog, then all devices would be
covered.

> @@ -125,7 +125,7 @@
>  			};
>  		};
>  
> -		usb@1b000100 {
> +		usb: usb@1b000100 {
>  			compatible = "qca,ar7100-ehci", "generic-ehci";
>  			reg = <0x1b000100 0x100>;
>  
> @@ -140,7 +140,7 @@
>  			status = "disabled";
>  		};
>  
> -		spi@1f000000 {
> +		spi: spi@1f000000 {
>  			compatible = "qca,ar9132-spi", "qca,ar7100-spi";
>  			reg = <0x1f000000 0x10>;
>  
> diff --git a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
> index c3069c3..9528ebd 100644
> --- a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
> +++ b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
> @@ -22,51 +22,10 @@
>  
>  	ahb {
>  		apb {
> -			uart@18020000 {
> -				status = "okay";
> -			};
> -
>  			pll-controller@18050000 {
>  				clocks = <&extosc>;
>  			};
>  		};

Better use a reference for the PLL clock too.

> -
> -		usb@1b000100 {
> -			status = "okay";
> -		};
> -
> -		spi@1f000000 {
> -			status = "okay";
> -			num-cs = <1>;
> -
> -			flash@0 {
> -				#address-cells = <1>;
> -				#size-cells = <1>;
> -				compatible = "s25sl064a";
> -				reg = <0>;
> -				spi-max-frequency = <25000000>;
> -
> -				partition@0 {
> -					label = "u-boot";
> -					reg = <0x000000 0x020000>;
> -				};
> -
> -				partition@1 {
> -					label = "firmware";
> -					reg = <0x020000 0x7D0000>;
> -				};
> -
> -				partition@2 {
> -					label = "art";
> -					reg = <0x7F0000 0x010000>;
> -					read-only;
> -				};
> -			};
> -		};
> -	};
> -
> -	usb-phy {
> -		status = "okay";
>  	};
>  
>  	gpio-keys {
> @@ -114,3 +73,44 @@
>  		};
>  	};
>  };
> +
> +&uart {
> +	status = "okay";
> +};
> +
> +&usb {
> +	status = "okay";
> +};
> +
> +&usb_phy {
> +	status = "okay";
> +};
> +
> +&spi {
> +	status = "okay";
> +	num-cs = <1>;
> +
> +	flash@0 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "s25sl064a";
> +		reg = <0>;
> +		spi-max-frequency = <25000000>;
> +
> +		partition@0 {
> +			label = "u-boot";
> +			reg = <0x000000 0x020000>;
> +		};
> +
> +		partition@1 {
> +			label = "firmware";
> +			reg = <0x020000 0x7D0000>;
> +		};
> +
> +		partition@2 {
> +			label = "art";
> +			reg = <0x7F0000 0x010000>;
> +			read-only;
> +		};

Looses partitions like this are now deprecated, we could take the
opportunity to move to the new scheme. We just have to put all the
"partition" nodes under a "partitions" node with a proper compatible and
#address-cells and #size-cells.

Alban
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-02-14 21:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1455400697-29898-1-git-send-email-antonynpavlov@gmail.com>
     [not found] ` <1455400697-29898-1-git-send-email-antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-13 21:58   ` [PATCH 01/10] dt-bindings: clock: qca,ath79-pll: fix copy-paste typos Antony Pavlov
2016-02-13 21:58   ` [PATCH 02/10] MIPS: dts: qca: ar9132: fix typo: "ppl" -> "pll" Antony Pavlov
2016-02-22  2:54     ` Rob Herring
2016-02-13 21:58   ` [PATCH 05/10] MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: drop unused alias node Antony Pavlov
     [not found]     ` <1455400697-29898-6-git-send-email-antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-14 13:46       ` Marek Vasut
     [not found]         ` <56C0851D.5090105-ynQEQJNshbs@public.gmane.org>
2016-02-15  8:36           ` Alban
2016-02-15  9:54           ` Antony Pavlov
2016-02-13 21:58   ` [PATCH 06/10] MIPS: dts: qca: ar9132: use short references for uart, usb and spi nodes Antony Pavlov
     [not found]     ` <1455400697-29898-7-git-send-email-antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-14 13:47       ` Marek Vasut
2016-02-14 21:24       ` Alban [this message]
2016-02-13 21:58 ` [PATCH 07/10] MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: use "ref" for reference clock name Antony Pavlov
2016-02-13 21:58 ` [RFC 08/10] MIPS: ath79: update devicetree support for AR9132 Antony Pavlov

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=20160214222445.6eee4365@tock \
    --to=albeu-ganu6spqydw@public.gmane.org \
    --cc=antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=daniel.schwierzeck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=marex-ynQEQJNshbs@public.gmane.org \
    --cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=wills.wang-EMRzualFZlQ@public.gmane.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).