* strange dtc errors after adding sram node
@ 2016-04-23 7:46 Stefan Wahren
[not found] ` <571B283F.8010707-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Wahren @ 2016-04-23 7:46 UTC (permalink / raw)
To: kernelnewbies, devicetree@vger.kernel.org
Cc: Jörg Krause, Shawn Guo, Sascha Hauer
Hi,
i want to add an sram node to arch/arm/boot/dts/imx28.dtsi. According to
the reference manual [1] the On-Chip RAM is connected to AHB, start
address 0 and has a size of 128 KB.
So i modified the imx28.dtsi based on the patch below. Unfortunately the
dtc give me some strang errors:
ERROR (duplicate_label): Duplicate label 'mac0' on
/ahb@80080000/ethernet@800f0000 and /ahb@00000000/ethernet@800f0000
ERROR: Input tree has errors, aborting (use -f to force output)
What's wrong with my patch or does it reveal another issue?
Regards
Stefan
[1] - http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM.pdf
i.MX28 Applications Processor Reference Manual, Rev. 2, 08/2013
Chapter 4.1 Memory Map Overview
-------------------------->8---------------------------------------
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -1311,13 +1311,18 @@
};
};
- ahb@80080000 {
+ ahb@00000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
- reg = <0x80080000 0x80000>;
+ reg = <0x00000000 0x20000>, <0x80080000 0x80000>;
ranges;
+ ocram: sram@00000000 {
+ compatible = "mmio-sram";
+ reg = <0x00000000 0x20000>;
+ };
+
usb0: usb@80080000 {
compatible = "fsl,imx28-usb", "fsl,imx27-usb";
reg = <0x80080000 0x10000>;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: strange dtc errors after adding sram node
[not found] ` <571B283F.8010707-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
@ 2016-04-23 8:18 ` Jörg Krause
[not found] ` <1461399514.2205.20.camel-L1vi/lXTdtsfGbAt6QbQcg@public.gmane.org>
2016-04-23 8:24 ` Arnd Bergmann
1 sibling, 1 reply; 8+ messages in thread
From: Jörg Krause @ 2016-04-23 8:18 UTC (permalink / raw)
To: Stefan Wahren, kernelnewbies-7JyXY6prKcjpASu1u0TL5ti2O/JbrIOy,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Shawn Guo, Sascha Hauer
Hi Stefan,
On Sa, 2016-04-23 at 09:46 +0200, Stefan Wahren wrote:
> Hi,
>
> i want to add an sram node to arch/arm/boot/dts/imx28.dtsi. According
> to
> the reference manual [1] the On-Chip RAM is connected to AHB, start
> address 0 and has a size of 128 KB.
>
> So i modified the imx28.dtsi based on the patch below. Unfortunately
> the
> dtc give me some strang errors:
>
> ERROR (duplicate_label): Duplicate label 'mac0' on
> /ahb@80080000/ethernet@800f0000 and /ahb@00000000/ethernet@800f0000
> ERROR: Input tree has errors, aborting (use -f to force output)
>
> What's wrong with my patch or does it reveal another issue?
>
> Regards
> Stefan
>
> [1] - http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM.p
> df
> i.MX28 Applications Processor Reference Manual, Rev. 2, 08/2013
> Chapter 4.1 Memory Map Overview
>
> -------------------------->8---------------------------------------
> --- a/arch/arm/boot/dts/imx28.dtsi
> +++ b/arch/arm/boot/dts/imx28.dtsi
> @@ -1311,13 +1311,18 @@
> };
> };
>
> - ahb@80080000 {
> + ahb@00000000 {
> compatible = "simple-bus";
> #address-cells = <1>;
> #size-cells = <1>;
> - reg = <0x80080000 0x80000>;
> + reg = <0x00000000 0x20000>, <0x80080000 0x80000>;
> ranges;
>
> + ocram: sram@00000000 {
> + compatible = "mmio-sram";
> + reg = <0x00000000 0x20000>;
> + };
> +
> usb0: usb@80080000 {
> compatible = "fsl,imx28-usb", "fsl,imx27-
> usb";
> reg = <0x80080000 0x10000>;
Follwing the address map for the i.MX28 (p. 125ff) the AHB is mapped to
different start addresses:
Bus MNEMONIC START ADDRESS
--------------------------------------
AHB OCRAM 0x00000000
AHB USBCTRL0 0x80080000
AHB OCROM 0xC0000000
So instead of replacing ahb@80080000 by ahb@00000000 a new node should
be created. However, I am not sure if this is really necessary, I
haven't seen it for all device trees using "mmio-sram".
Best regards
Jörg Krause
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: strange dtc errors after adding sram node
[not found] ` <571B283F.8010707-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
2016-04-23 8:18 ` Jörg Krause
@ 2016-04-23 8:24 ` Arnd Bergmann
1 sibling, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-04-23 8:24 UTC (permalink / raw)
To: Stefan Wahren
Cc: kernelnewbies-7JyXY6prKcjpASu1u0TL5ti2O/JbrIOy,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jörg Krause, Shawn Guo, Sascha Hauer
On Saturday 23 April 2016 09:46:07 Stefan Wahren wrote:
> - ahb@80080000 {
> + ahb@00000000 {
> compatible = "simple-bus";
> #address-cells = <1>;
> #size-cells = <1>;
> - reg = <0x80080000 0x80000>;
> + reg = <0x00000000 0x20000>, <0x80080000 0x80000>;
> ranges;
>
> + ocram: sram@00000000 {
> + compatible = "mmio-sram";
> + reg = <0x00000000 0x20000>;
> + };
> +
> usb0: usb@80080000 {
> compatible = "fsl,imx28-usb", "fsl,imx27-usb";
> reg = <0x80080000 0x10000>;
Something odd about this is that you have duplicated addresses:
The sram node has the same "reg" property as the "ahb" node,
and also the existing address (0x80080000) overlaps with that of
the usb node.
The registers of a device should generally be non-overlapping
with registers of other devices.
Further, the binding of "simple-bus" doesn't specify any particular
register layout for its internal register set.
My best guess is that the author of the original dts file confused
the 'reg' property of the ahb node with a 'ranges' property that should
list which address range gets translated into what child addresses.
I don't see how that could lead to the dtc error you get, but it's
probably worth fixing anyway.
Arnd
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: strange dtc errors after adding sram node
[not found] ` <1461399514.2205.20.camel-L1vi/lXTdtsfGbAt6QbQcg@public.gmane.org>
@ 2016-04-23 10:33 ` Jörg Krause
[not found] ` <1461407589.1986.3.camel-L1vi/lXTdtsfGbAt6QbQcg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Jörg Krause @ 2016-04-23 10:33 UTC (permalink / raw)
To: Stefan Wahren, kernelnewbies-7JyXY6prKcjpASu1u0TL5ti2O/JbrIOy,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Shawn Guo, Sascha Hauer
Hi Stefan,
On Sa, 2016-04-23 at 10:18 +0200, Jörg Krause wrote:
> Hi Stefan,
>
> On Sa, 2016-04-23 at 09:46 +0200, Stefan Wahren wrote:
> > Hi,
> >
> > i want to add an sram node to arch/arm/boot/dts/imx28.dtsi.
> > According
> > to
> > the reference manual [1] the On-Chip RAM is connected to AHB,
> > start
> > address 0 and has a size of 128 KB.
> >
> > So i modified the imx28.dtsi based on the patch below.
> > Unfortunately
> > the
> > dtc give me some strang errors:
> >
> > ERROR (duplicate_label): Duplicate label 'mac0' on
> > /ahb@80080000/ethernet@800f0000 and /ahb@00000000/ethernet@800f0000
> > ERROR: Input tree has errors, aborting (use -f to force output)
> >
> > What's wrong with my patch or does it reveal another issue?
> >
> > Regards
> > Stefan
> >
> > [1] - http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM
> > .p
> > df
> > i.MX28 Applications Processor Reference Manual, Rev. 2, 08/2013
> > Chapter 4.1 Memory Map Overview
> >
> > -------------------------->8---------------------------------------
> > --- a/arch/arm/boot/dts/imx28.dtsi
> > +++ b/arch/arm/boot/dts/imx28.dtsi
> > @@ -1311,13 +1311,18 @@
> > };
> > };
> >
> > - ahb@80080000 {
> > + ahb@00000000 {
> > compatible = "simple-bus";
> > #address-cells = <1>;
> > #size-cells = <1>;
> > - reg = <0x80080000 0x80000>;
> > + reg = <0x00000000 0x20000>, <0x80080000 0x80000>;
> > ranges;
> >
> > + ocram: sram@00000000 {
> > + compatible = "mmio-sram";
> > + reg = <0x00000000 0x20000>;
> > + };
> > +
> > usb0: usb@80080000 {
> > compatible = "fsl,imx28-usb", "fsl,imx27-
> > usb";
> > reg = <0x80080000 0x10000>;
>
> Follwing the address map for the i.MX28 (p. 125ff) the AHB is mapped
> to
> different start addresses:
>
> Bus MNEMONIC START ADDRESS
> --------------------------------------
> AHB OCRAM 0x00000000
> AHB USBCTRL0 0x80080000
> AHB OCROM 0xC0000000
>
> So instead of replacing ahb@80080000 by ahb@00000000 a new node
> should
> be created. However, I am not sure if this is really necessary, I
> haven't seen it for all device trees using "mmio-sram".
Sorry, for not looking carefully enough at your patch. Haven't seen you
adjusted the 'reg' property. I tried with an additional ahb@00000000 no
de and this did work.
So, there is really something odd here...
Best regards
Jörg Krause
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: strange dtc errors after adding sram node
[not found] ` <1461407589.1986.3.camel-L1vi/lXTdtsfGbAt6QbQcg@public.gmane.org>
@ 2016-04-25 6:04 ` Stefan Wahren
[not found] ` <571DB385.9010305-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Wahren @ 2016-04-25 6:04 UTC (permalink / raw)
To: Jörg Krause, kernelnewbies-7JyXY6prKcjpASu1u0TL5ti2O/JbrIOy,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Shawn Guo, Sascha Hauer
Hi Jörg,
Am 23.04.2016 um 12:33 schrieb Jörg Krause:
> Hi Stefan,
>
> On Sa, 2016-04-23 at 10:18 +0200, Jörg Krause wrote:
>> Hi Stefan,
>>
>> On Sa, 2016-04-23 at 09:46 +0200, Stefan Wahren wrote:
>>> Hi,
>>>
>>> i want to add an sram node to arch/arm/boot/dts/imx28.dtsi.
>>> According
>>> to
>>> the reference manual [1] the On-Chip RAM is connected to AHB,
>>> start
>>> address 0 and has a size of 128 KB.
>>>
>>> So i modified the imx28.dtsi based on the patch below.
>>> Unfortunately
>>> the
>>> dtc give me some strang errors:
>>>
>>> ERROR (duplicate_label): Duplicate label 'mac0' on
>>> /ahb@80080000/ethernet@800f0000 and /ahb@00000000/ethernet@800f0000
>>> ERROR: Input tree has errors, aborting (use -f to force output)
>>>
>>> What's wrong with my patch or does it reveal another issue?
>>>
>>> Regards
>>> Stefan
>>>
>>> [1] - http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM
>>> .p
>>> df
>>> i.MX28 Applications Processor Reference Manual, Rev. 2, 08/2013
>>> Chapter 4.1 Memory Map Overview
>>>
>>> -------------------------->8---------------------------------------
>>> --- a/arch/arm/boot/dts/imx28.dtsi
>>> +++ b/arch/arm/boot/dts/imx28.dtsi
>>> @@ -1311,13 +1311,18 @@
>>> };
>>> };
>>>
>>> - ahb@80080000 {
>>> + ahb@00000000 {
>>> compatible = "simple-bus";
>>> #address-cells = <1>;
>>> #size-cells = <1>;
>>> - reg = <0x80080000 0x80000>;
>>> + reg = <0x00000000 0x20000>, <0x80080000 0x80000>;
>>> ranges;
>>>
>>> + ocram: sram@00000000 {
>>> + compatible = "mmio-sram";
>>> + reg = <0x00000000 0x20000>;
>>> + };
>>> +
>>> usb0: usb@80080000 {
>>> compatible = "fsl,imx28-usb", "fsl,imx27-
>>> usb";
>>> reg = <0x80080000 0x10000>;
>>
>> Follwing the address map for the i.MX28 (p. 125ff) the AHB is mapped
>> to
>> different start addresses:
>>
>> Bus MNEMONIC START ADDRESS
>> --------------------------------------
>> AHB OCRAM 0x00000000
>> AHB USBCTRL0 0x80080000
>> AHB OCROM 0xC0000000
>>
>> So instead of replacing ahb@80080000 by ahb@00000000 a new node
>> should
>> be created. However, I am not sure if this is really necessary, I
>> haven't seen it for all device trees using "mmio-sram".
>
> Sorry, for not looking carefully enough at your patch. Haven't seen you
> adjusted the 'reg' property. I tried with an additional ahb@00000000 no
> de and this did work.
>
> So, there is really something odd here...
i've found reason for these errors. I missed to adjust the affected dts
files which refer to the ahb node.
Stefan
>
> Best regards
> Jörg Krause
>
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: strange dtc errors after adding sram node
[not found] ` <571DB385.9010305-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
@ 2016-04-25 13:06 ` Arnd Bergmann
2016-04-27 20:16 ` Stefan Wahren
0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2016-04-25 13:06 UTC (permalink / raw)
To: Stefan Wahren
Cc: Jörg Krause, kernelnewbies-7JyXY6prKcjpASu1u0TL5ti2O/JbrIOy,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Shawn Guo,
Sascha Hauer
On Monday 25 April 2016 08:04:53 Stefan Wahren wrote:
> >>> reg = <0x80080000 0x10000>;
> >>
> >> Follwing the address map for the i.MX28 (p. 125ff) the AHB is mapped
> >> to
> >> different start addresses:
> >>
> >> Bus MNEMONIC START ADDRESS
> >> --------------------------------------
> >> AHB OCRAM 0x00000000
> >> AHB USBCTRL0 0x80080000
> >> AHB OCROM 0xC0000000
> >>
> >> So instead of replacing ahb@80080000 by ahb@00000000 a new node
> >> should
> >> be created. However, I am not sure if this is really necessary, I
> >> haven't seen it for all device trees using "mmio-sram".
> >
> > Sorry, for not looking carefully enough at your patch. Haven't seen you
> > adjusted the 'reg' property. I tried with an additional ahb@00000000 no
> > de and this did work.
> >
> > So, there is really something odd here...
>
> i've found reason for these errors. I missed to adjust the affected dts
> files which refer to the ahb node.
Makes sense. Maybe you can just remove the address and 'reg' property from
the ahb node? That should solve the dtc problem and make the contents
more like what we have elsewhere.
Arnd
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: strange dtc errors after adding sram node
2016-04-25 13:06 ` Arnd Bergmann
@ 2016-04-27 20:16 ` Stefan Wahren
[not found] ` <57211E2A.5060807-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Wahren @ 2016-04-27 20:16 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jörg Krause, kernelnewbies-7JyXY6prKcjpASu1u0TL5ti2O/JbrIOy,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Shawn Guo,
Sascha Hauer
Hi Arnd,
Am 25.04.2016 um 15:06 schrieb Arnd Bergmann:
> On Monday 25 April 2016 08:04:53 Stefan Wahren wrote:
>>
>> i've found reason for these errors. I missed to adjust the affected dts
>> files which refer to the ahb node.
>
> Makes sense. Maybe you can just remove the address and 'reg' property from
> the ahb node?
is this a proposal for a patch set?
Does it apply to all top-level nodes like apb?
> That should solve the dtc problem and make the contents
> more like what we have elsewhere.
Does it refer to a specific patch / discussion or something?
Regards
Stefan
>
> Arnd
>
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: strange dtc errors after adding sram node
[not found] ` <57211E2A.5060807-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
@ 2016-04-27 20:20 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-04-27 20:20 UTC (permalink / raw)
To: Stefan Wahren
Cc: Jörg Krause, kernelnewbies-7JyXY6prKcjpASu1u0TL5ti2O/JbrIOy,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Shawn Guo,
Sascha Hauer
On Wednesday 27 April 2016 22:16:42 Stefan Wahren wrote:
> Am 25.04.2016 um 15:06 schrieb Arnd Bergmann:
> > On Monday 25 April 2016 08:04:53 Stefan Wahren wrote:
> >>
> >> i've found reason for these errors. I missed to adjust the affected dts
> >> files which refer to the ahb node.
> >
> > Makes sense. Maybe you can just remove the address and 'reg' property from
> > the ahb node?
>
> is this a proposal for a patch set?
Yes.
> Does it apply to all top-level nodes like apb?
Only those that have a fake "reg" property. A bus device node
can of course have its own registers, it just shouldn't list as
its "reg" the registers of its child devices.
Arnd
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-04-27 20:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-23 7:46 strange dtc errors after adding sram node Stefan Wahren
[not found] ` <571B283F.8010707-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
2016-04-23 8:18 ` Jörg Krause
[not found] ` <1461399514.2205.20.camel-L1vi/lXTdtsfGbAt6QbQcg@public.gmane.org>
2016-04-23 10:33 ` Jörg Krause
[not found] ` <1461407589.1986.3.camel-L1vi/lXTdtsfGbAt6QbQcg@public.gmane.org>
2016-04-25 6:04 ` Stefan Wahren
[not found] ` <571DB385.9010305-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
2016-04-25 13:06 ` Arnd Bergmann
2016-04-27 20:16 ` Stefan Wahren
[not found] ` <57211E2A.5060807-saaNCTdWVBT7BZbvpMY5sg@public.gmane.org>
2016-04-27 20:20 ` Arnd Bergmann
2016-04-23 8:24 ` Arnd Bergmann
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).