From: peter.griffin@linaro.org (Peter Griffin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 13/14] ARM: STi: DT: STiH410: Add usb2 picophy dt nodes
Date: Fri, 14 Nov 2014 13:34:25 +0000 [thread overview]
Message-ID: <20141114133425.GA28680@griffinp-ThinkPad-X1-Carbon-2nd> (raw)
In-Reply-To: <1546892.RCPeXgVQNJ@wuerfel>
Hi Arnd,
Thanks for taking the time to explain this.
On Fri, 14 Nov 2014, Arnd Bergmann wrote:
<snip>
> > address of the device's resources within the address space defined by its parent bus").
>
> You will also have to add an appropriate 'ranges' property then.
>
> > Or maybe you meant, if I want to keep the picophy node where it is (under soc), I need to stop using the reg
> > property?
>
> That would also be possible, just put the register numbers into your 'st,syscfg'
> property after the phandle, and leave the reg property empty then.
I think this is the best approach and whay I will do, as it would also extend well to devices with sysconfig
registers in different banks.
>
> > The other problem I was describing is a device with some memory mapped registers and some
> > sysconfig registers you can find examples already upstream in stih416.dtsi file with the
> > ethernet0 and miphy365x_phy nodes.
> >
> > Here the first 1/2 reg properties are expressed as a 32 bit physical address and size (meets the spec definition),
> > and the last is expressed as a sysconfig offset and size (which AFAIK doesn't match the spec definition).
> > This change in address space is however documented in the bindings documentation.
> >
> > How should devices which have multiple address spaces ideally be handled?
>
> There should at most be one 'reg' address space, so put it under the node whose
> bus these refer to. Put all offsets that are relative to a syscon link into
> the phandle that refers to the syscon device, or hardcode the offsets in the
> driver.
Ok makes sense.
>
> > From looking around in the source I see a few different ways people have done this: -
> >
> > 1) Some drivers encode the data statically into the source and make a decision based on compatible string.
> > 2) Some drivers add a couple of extra dt properties to encode the offset (spifsm in stih416)
> > 3) Some drivers mix address spaces in the reg properties (examples given above)
> > 3) Probably some other ways I've not found yet
> >
> > Is there a blessed way of doing this? It would be nice at least for all the drivers in STI to be doing
> > it the same as currently there seems to be a mix of implementations.
>
> You can do 1 or 2, not 3.
Yep got it.
One last question, what are the rules about updating ethernet and miphy365 over to using this method for there sysconfig registers?
regards,
Peter.
next prev parent reply other threads:[~2014-11-14 13:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 11:00 [PATCH v2 00/14] Add stih410 SoC and USB2/1.1 support Peter Griffin
2014-11-13 11:00 ` [PATCH v2 01/14] ARM: STi: DT: STiH416: Add pinctl setup for usb controllers Peter Griffin
2014-11-13 11:00 ` [PATCH v2 02/14] ARM: STi: DT: STiH416: Add DT node for the stih415/6 usb2 phy Peter Griffin
2014-11-13 11:00 ` [PATCH v2 03/14] ARM: STi: DT: STiH416: Add DT nodes for the ehci and ohci usb controllers Peter Griffin
2014-11-13 11:00 ` [PATCH v2 04/14] ARM: multi_v7_defconfig: Enable st ohci and ehci HCD drivers Peter Griffin
2014-11-13 11:00 ` [PATCH v2 05/14] ARM: multi_v7_defconfig: Enable stih415/6 usb2 phy driver Peter Griffin
2014-11-13 11:00 ` [PATCH v2 06/14] ARM: multi_v7_defconfig: Enable stih407 usb picophy Peter Griffin
2014-11-13 11:00 ` [PATCH v2 07/14] ARM: STi: DT: STiH407: Add usb2 picophy dt nodes Peter Griffin
2014-11-13 11:00 ` [PATCH v2 08/14] ARM: STi: DT: STiH410: Add defines for STiH410 DT clocks Peter Griffin
2014-11-13 11:00 ` [PATCH v2 09/14] ARM: STi: DT: STiH410: Add pinctl config for usb controllers Peter Griffin
2014-11-13 11:00 ` [PATCH v2 10/14] ARM: STi: DT: STih407: Abstract common dt nodes into shared files Peter Griffin
2014-11-13 11:00 ` [PATCH v2 11/14] ARM: STi: DT: STiH410: Add STiH410 SoC and b2120 board support Peter Griffin
2014-11-13 11:00 ` [PATCH v2 12/14] ARM: STi: DT: STih407: STih410: Add clk_ignore_unused to kernel bootargs Peter Griffin
2014-11-13 11:00 ` [PATCH v2 13/14] ARM: STi: DT: STiH410: Add usb2 picophy dt nodes Peter Griffin
2014-11-13 11:15 ` Arnd Bergmann
2014-11-13 14:54 ` Peter Griffin
2014-11-13 17:41 ` Arnd Bergmann
2014-11-14 9:56 ` Peter Griffin
2014-11-14 11:03 ` Arnd Bergmann
2014-11-14 13:34 ` Peter Griffin [this message]
2014-11-14 14:59 ` Arnd Bergmann
2014-11-13 11:00 ` [PATCH v2 14/14] ARM: STi: DT: STiH410: Add DT nodes for the ehci and ohci usb controllers Peter Griffin
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=20141114133425.GA28680@griffinp-ThinkPad-X1-Carbon-2nd \
--to=peter.griffin@linaro.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).