From: Simon Horman <horms@verge.net.au>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <magnus.damm@gmail.com>,
Bastian Hecht <hechtb@gmail.com>,
linux-sh@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH v3 3/3] ARM: mach-shmobile: r8a7740: Setup the serial devices using DT
Date: Tue, 5 Mar 2013 16:04:39 +0900 [thread overview]
Message-ID: <20130305070439.GA15907@verge.net.au> (raw)
In-Reply-To: <Pine.LNX.4.64.1303050740330.24699@axis700.grange>
On Tue, Mar 05, 2013 at 07:52:21AM +0100, Guennadi Liakhovetski wrote:
> Hi Simon
>
> On Tue, 5 Mar 2013, Simon Horman wrote:
>
> > On Mon, Mar 04, 2013 at 02:33:40PM +0100, Guennadi Liakhovetski wrote:
>
> [snip]
>
> > > That would be the best, I agree. However, we discussed this already on the
> > > example of mmcif, you might remember. I asked what's the difference
> > > between extending a DT node (from .dtsi) with additional properties (in a
> > > board-specific .dts) using an "&phandle" syntax and a full path? Or are
> > > they equivalent? There was no reply, so, for such nodes (MMC/SD) I so far
> > > settled with complete nodes in .dts. We do use the "&phandle" syntax for
> > > pinctrl function groups, for I2C devices. I used a complete path for
> > > CPUFreq... Mostly because other platforms did that too.
> >
> > I am confused.
> >
> > Using phandle syntax we can add a device to an soc's dtsi file and then add
> > extra properties in the board file. This seems to be match the HW well.
> >
> > What is your alternate suggestion?
>
> Let me give you examples. In sh73a0-reference.dtsi we define an I2C device
> #0:
>
> i2c0: i2c@0xe6820000 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "renesas,rmobile-iic";
> reg = <0xe6820000 0x425>;
> ...
> };
>
> Then in sh73a0-kzm9g-reference.dts I can use the phandle syntax to put
> devices on that I2C bus:
>
> &i2c0 {
> as3711@40 {
> compatible = "ams,as3711";
> reg = <0x40>;
> ...
> };
> ...
> };
>
> This is one possibility. In sh73a0.dtsi we've got
>
> cpus {
> #address-cells = <1>;
> #size-cells = <0>;
>
> cpu@0 {
> device_type = "cpu";
> compatible = "arm,cortex-a9";
> reg = <0>;
> };
> ...
> };
>
> Now, I can also extend this in sh73a0-kzm9g-reference.dts to add CPUFreq
> support to CPU0:
>
> cpus {
> cpu@0 {
> cpu0-supply = <&vdd_dvfs>;
> operating-points = <
> /* kHz uV */
> 1196000 1315000
> 598000 1175000
> 398667 1065000
> >;
> voltage-tolerance = <1>; /* 1% */
> };
> };
>
> Which AFAICS does a similar thing (adds more properties to an existing DT
> node) but uses a different syntax. Maybe they are completely equivalent,
> the only difference being, that the former example uses a phandle and the
> latter a complete path, maybe there are differences, I don't know.
Interesting. Thanks for the example, I now understand.
To be honest I'm not sure what the answer is.
But if they are both working then I'm not particularly fussed either way.
next prev parent reply other threads:[~2013-03-05 7:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 17:03 [PATCH v3 1/3] serial: sh-sci: Add OF support Bastian Hecht
2013-02-26 17:03 ` [PATCH v3 2/3] ARM: mach-shmobile: r8a7740: Add DT names to clock list Bastian Hecht
2013-03-01 9:42 ` Simon Horman
2013-02-26 17:03 ` [PATCH v3 3/3] ARM: mach-shmobile: r8a7740: Setup the serial devices using DT Bastian Hecht
2013-03-01 9:42 ` Simon Horman
2013-03-01 16:21 ` Bastian Hecht
2013-03-02 1:31 ` Simon Horman
2013-03-04 12:48 ` Magnus Damm
2013-03-04 13:33 ` Guennadi Liakhovetski
2013-03-05 3:27 ` Simon Horman
2013-03-05 6:52 ` Guennadi Liakhovetski
2013-03-05 7:04 ` Simon Horman [this message]
2013-03-04 15:44 ` Bastian Hecht
2013-03-05 3:36 ` Simon Horman
2013-02-27 8:07 ` [PATCH v3 1/3] serial: sh-sci: Add OF support Paul Mundt
2013-02-27 8:11 ` Magnus Damm
2013-02-27 8:19 ` Paul Mundt
2013-02-27 8:26 ` Magnus Damm
2013-02-27 9:04 ` Simon Horman
2013-02-27 9:34 ` Paul Mundt
2013-02-28 19:20 ` Bastian Hecht
2013-03-01 0:50 ` Simon Horman
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=20130305070439.GA15907@verge.net.au \
--to=horms@verge.net.au \
--cc=g.liakhovetski@gmx.de \
--cc=hechtb@gmail.com \
--cc=lethal@linux-sh.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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).