devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Rob Herring <robh@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	devicetree@vger.kernel.org, Marcel Partap <mpartap@gmx.net>,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Scott <michael.scott@linaro.org>
Subject: Re: [PATCH] mfd: cpcap: Add minimal support
Date: Wed, 23 Nov 2016 07:03:01 -0800	[thread overview]
Message-ID: <20161123150300.GA4082@atomide.com> (raw)
In-Reply-To: <20161121163439.22ztjxnq535lo6dd@rob-hp-laptop>

* Rob Herring <robh@kernel.org> [161121 08:34]:
> On Mon, Nov 21, 2016 at 11:45:58AM +0000, Lee Jones wrote:
> > On Fri, 18 Nov 2016, Tony Lindgren wrote:
> > > +Example:
> > > +
> > > +&mcspi1 {
> > > +	#address-cells = <1>;
> > > +	#size-cells = <1>;
> > > +	ranges;
> > > +	cpcap: pmic@0 {
> > > +		compatible = "motorola,cpcap", "st,6556002";
> > > +		reg = <0 0>;	/* cs0, size 0 */
> > 
> > Is this really correct?
> 
> No, SPI devices are 1 cell and there shouldn't be a ranges prop.
> 
> > 
> > How can ranges have a size of 0x8000 and this 0?
> 
> reg here doesn't affect ranges and address translation.
> 
> Perhaps this is trying to make address translation work, but if that 
> does, it is by chance. Children of pmic addresses in the range of 
> 0-0x8000 would get translated to "cpu address" 0-0x8000 as long as the 
> DT has empty ranges up to the root. If the parent bus (i.e. SoC bus) has 
> any base address, then that is going to get added which would not be 
> good.

Yes I was thinking we can just get the register offset from the
cpcap base from dts for children. So a range from 0-0x8000.

Rob, do you have any better suggestions for doing that?

Anyways, the children can just rely on regmap too, so I'll just
drop the ranges here. If we ever come up with suitable ranges for
cases like this we can change it later.

Regards,

Tony

  reply	other threads:[~2016-11-23 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-19  1:27 [PATCH] mfd: cpcap: Add minimal support Tony Lindgren
2016-11-21 11:45 ` Lee Jones
2016-11-21 16:34   ` Rob Herring
2016-11-23 15:03     ` Tony Lindgren [this message]
2016-11-23 15:26   ` Tony Lindgren
2016-11-24  8:59     ` Lee Jones
2016-11-24 14:43       ` Tony Lindgren
     [not found]       ` <20161124085926.GV10134-Re9dqnLqz4GzQB+pC5nmwQ@public.gmane.org>
2016-11-29 15:20         ` Rob Herring
2016-11-29 15:48           ` Tony Lindgren

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=20161123150300.GA4082@atomide.com \
    --to=tony@atomide.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michael.scott@linaro.org \
    --cc=mpartap@gmx.net \
    --cc=robh@kernel.org \
    --cc=sameo@linux.intel.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).