All of lore.kernel.org
 help / color / mirror / Atom feed
From: vz@mleia.com (Vladimir Zapolskiy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] arm: dts: lpc32xx: fix improper usage of ranges property
Date: Wed, 14 Oct 2015 17:07:26 +0300	[thread overview]
Message-ID: <561E619E.9020504@mleia.com> (raw)
In-Reply-To: <7163229.YtgKU9kxxJ@wuerfel>

On 14.10.2015 16:52, Arnd Bergmann wrote:
> On Wednesday 14 October 2015 02:13:49 Vladimir Zapolskiy wrote:
>> Ok, practically it should work for my purposes, but the change must be
>> done along with added EMC device node description.
>>
>> I'm not so confident that it is correct to add description of static
>> memory banks to ahb node though, please give me a short confirmation,
> 
> The DT should reflect whichever memory ranges are accessible
> on the bus. I've looked up the memory map in the data sheet, and
> I think a reasonable representation would be
> 
> /ahb {
> 	ranges = <0x20000000 0x20000000 0x10000000>, /* AHB port 5 */
> 		 <0x30000000 0x30000000 0x10000000>, /* AHB port 6 */
> 		 <0x40000000 0x40000000 0x10000000>, /* AHB port 7 */
> 		 <0x80000000 0x80000000 0x40000000>, /* EMC DYCS0/1 */
> 		 <0xE0000000 0xE0000000 0x04000000>; /* EMC CS0-3 */
> 
> 	apb {
> 		ranges = <0x20080000 0x20080000 0x00020000>;
> 	};
> 
> };

A simpler version of this change in /ahb I successfully tested with EMC
yesterday:

-               ranges = <0x20000000 0x20000000 0x30000000>;
+               ranges = <0x20000000 0x20000000 0x30000000
+                         0xe0000000 0xe0000000 0x04000000>;


> alternatively, each AHB port could be a separate node, with a
> more direct translation like
> 
> /ahb5 {
> 	ranges = <0 0x20000000 0x10000000>;
> 
> 	apb {
> 		ranges = <0 0x80000 0x20000>;
> 	};
> };
> /ahb6 {
> 	ranges = <0 0x30000000 0x10000000>,	      /* AHB registers */
> 		 <0x80000000 0x80000000 0x40000000>, /* EMC DYCS0/1 */
> 		 <0xE0000000 0xE0000000 0x04000000>; /* EMC CS0-3 */
> 
> 	memory-controller at 1080000 {
> 		reg = <0x1080000 0x10000>;
> 	};
> };
> ...
> 
> Does this make sense?

Yes, I personally would prefer to see the first version as the simplest
working one, if needed it should be converted to the second one later on.

>> then I'll send a change for inclusion of EMC description -- the one
>> above excluding clocks and clock-names properties, work on CCF is in
>> progress.
> 
> Ah, very nice! That should get us very close to multiplatform support!
> I've just tried building lpc32xx without the headers to check for
> other issues, and ended up with the patch below to get it building.
> It's clearly wrong, but it highlights a number of issues.

Sure, I'll review the highlighted problems, thanks.

--
With best wishes,
Vladimir

WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Zapolskiy <vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Roland Stigge <stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>,
	Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Joachim Eastwood
	<manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 2/5] arm: dts: lpc32xx: fix improper usage of ranges property
Date: Wed, 14 Oct 2015 17:07:26 +0300	[thread overview]
Message-ID: <561E619E.9020504@mleia.com> (raw)
In-Reply-To: <7163229.YtgKU9kxxJ@wuerfel>

On 14.10.2015 16:52, Arnd Bergmann wrote:
> On Wednesday 14 October 2015 02:13:49 Vladimir Zapolskiy wrote:
>> Ok, practically it should work for my purposes, but the change must be
>> done along with added EMC device node description.
>>
>> I'm not so confident that it is correct to add description of static
>> memory banks to ahb node though, please give me a short confirmation,
> 
> The DT should reflect whichever memory ranges are accessible
> on the bus. I've looked up the memory map in the data sheet, and
> I think a reasonable representation would be
> 
> /ahb {
> 	ranges = <0x20000000 0x20000000 0x10000000>, /* AHB port 5 */
> 		 <0x30000000 0x30000000 0x10000000>, /* AHB port 6 */
> 		 <0x40000000 0x40000000 0x10000000>, /* AHB port 7 */
> 		 <0x80000000 0x80000000 0x40000000>, /* EMC DYCS0/1 */
> 		 <0xE0000000 0xE0000000 0x04000000>; /* EMC CS0-3 */
> 
> 	apb {
> 		ranges = <0x20080000 0x20080000 0x00020000>;
> 	};
> 
> };

A simpler version of this change in /ahb I successfully tested with EMC
yesterday:

-               ranges = <0x20000000 0x20000000 0x30000000>;
+               ranges = <0x20000000 0x20000000 0x30000000
+                         0xe0000000 0xe0000000 0x04000000>;


> alternatively, each AHB port could be a separate node, with a
> more direct translation like
> 
> /ahb5 {
> 	ranges = <0 0x20000000 0x10000000>;
> 
> 	apb {
> 		ranges = <0 0x80000 0x20000>;
> 	};
> };
> /ahb6 {
> 	ranges = <0 0x30000000 0x10000000>,	      /* AHB registers */
> 		 <0x80000000 0x80000000 0x40000000>, /* EMC DYCS0/1 */
> 		 <0xE0000000 0xE0000000 0x04000000>; /* EMC CS0-3 */
> 
> 	memory-controller@1080000 {
> 		reg = <0x1080000 0x10000>;
> 	};
> };
> ...
> 
> Does this make sense?

Yes, I personally would prefer to see the first version as the simplest
working one, if needed it should be converted to the second one later on.

>> then I'll send a change for inclusion of EMC description -- the one
>> above excluding clocks and clock-names properties, work on CCF is in
>> progress.
> 
> Ah, very nice! That should get us very close to multiplatform support!
> I've just tried building lpc32xx without the headers to check for
> other issues, and ended up with the patch below to get it building.
> It's clearly wrong, but it highlights a number of issues.

Sure, I'll review the highlighted problems, thanks.

--
With best wishes,
Vladimir
--
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

  reply	other threads:[~2015-10-14 14:07 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 23:54 [PATCH 0/5] arm: dts: lpc32xx: fixes and updates to lpc32xx.dtsi Vladimir Zapolskiy
2015-10-12 23:54 ` Vladimir Zapolskiy
2015-10-12 23:54 ` [PATCH 1/5] arm: dts: lpc32xx: change include syntax to be C preprocessor friendly Vladimir Zapolskiy
2015-10-12 23:54   ` Vladimir Zapolskiy
2015-10-12 23:54 ` [PATCH 2/5] arm: dts: lpc32xx: fix improper usage of ranges property Vladimir Zapolskiy
2015-10-12 23:54   ` Vladimir Zapolskiy
2015-10-13 12:44   ` Arnd Bergmann
2015-10-13 12:44     ` Arnd Bergmann
2015-10-13 15:51     ` Vladimir Zapolskiy
2015-10-13 15:51       ` Vladimir Zapolskiy
2015-10-13 19:36       ` Arnd Bergmann
2015-10-13 19:36         ` Arnd Bergmann
2015-10-13 23:13         ` Vladimir Zapolskiy
2015-10-13 23:13           ` Vladimir Zapolskiy
2015-10-14 13:52           ` Arnd Bergmann
2015-10-14 13:52             ` Arnd Bergmann
2015-10-14 14:07             ` Vladimir Zapolskiy [this message]
2015-10-14 14:07               ` Vladimir Zapolskiy
2015-10-14 14:13               ` Arnd Bergmann
2015-10-14 14:13                 ` Arnd Bergmann
2015-10-14 17:23             ` Joachim Eastwood
2015-10-14 17:23               ` Joachim Eastwood
2015-10-14 20:07               ` Arnd Bergmann
2015-10-14 20:07                 ` Arnd Bergmann
2015-10-14 21:15                 ` Joachim Eastwood
2015-10-14 21:15                   ` Joachim Eastwood
2015-10-12 23:54 ` [PATCH 3/5] arm: dts: lpc32xx: add labels to all defined peripheral nodes Vladimir Zapolskiy
2015-10-12 23:54   ` Vladimir Zapolskiy
2015-10-12 23:54 ` [PATCH 4/5] arm: dts: lpc32xx: remove unneeded cell settings from cpus Vladimir Zapolskiy
2015-10-12 23:54   ` Vladimir Zapolskiy
2015-10-13  8:18   ` Joachim Eastwood
2015-10-13  8:18     ` Joachim Eastwood
2015-10-13 10:03     ` Vladimir Zapolskiy
2015-10-13 10:03       ` Vladimir Zapolskiy
2015-10-13 16:20   ` [PATCH v2 4/5] arm: dts: lpc32xx: add reg property to cpu device node Vladimir Zapolskiy
2015-10-13 16:20     ` Vladimir Zapolskiy
2015-10-12 23:54 ` [PATCH 5/5] arm: dts: lpc32xx: add device node for the second pwm controller Vladimir Zapolskiy
2015-10-12 23:54   ` Vladimir Zapolskiy
2015-10-14 18:04   ` Joachim Eastwood
2015-10-14 18:04     ` Joachim Eastwood
2015-10-15 10:25     ` Vladimir Zapolskiy
2015-10-15 10:25       ` Vladimir Zapolskiy

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=561E619E.9020504@mleia.com \
    --to=vz@mleia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.