strange dtc errors after adding sram node
Subsystems (2)
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 at 80080000/ethernet at 800f0000 and /ahb at 00000000/ethernet at 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---------------------------------------
arch/arm/boot/dts/imx28.dtsi +7 -2
@@ -1311,13 +1311,18 @@ }; }; - ahb at 80080000 { + ahb at 00000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - reg = <0x80080000 0x80000>; + reg = <0x00000000 0x20000>, <0x80080000 0x80000>; ranges; + ocram: sram at 00000000 { + compatible = "mmio-sram"; + reg = <0x00000000 0x20000>; + }; + usb0: usb at 80080000 { compatible = "fsl,imx28-usb", "fsl,imx27-usb"; reg = <0x80080000 0x10000>;
Hi Stefan,
Quoted 47 lines · Stefan Wahren
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.dtsibased 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---------------------------------------
arch/arm/boot/dts/imx28.dtsi +7
-2@@ -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 {
Quoted 3 lines
compatible = "fsl,imx28-usb", "fsl,imx27- usb";
reg = <0x800800000x10000>;
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · On Saturday 23 April 2016 09:46:07 Stefan Wahren wrote:
arch/arm/boot/dts/imx28.dtsi +2
-2- ahb@80080000 { + ahb@00000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - reg = <0x80080000 0x80000>; + reg = <0x00000000 0x20000>, <0x80080000 0x80000>;
arch/arm/boot/dts/imx28.dtsi line 1328
Quoted 10 lines
arch/arm/boot/dts/imx28.dtsi +5
-0ranges; + 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Stefan,
Quoted 68 lines · Jörg Krause
Hi Stefan,
Quoted 51 lines · Stefan Wahren
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.dtsibased 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---------------------------------------
arch/arm/boot/dts/imx28.dtsi +7
-2@@ -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 {Quoted 3 lines
compatible = "fsl,imx28-usb", "fsl,imx27- usb";
reg = <0x800800000x10000>;Follwing the address map for the i.MX28 (p. 125ff) the AHB is mapped to
different start addresses:Bus MNEMONIC START ADDRESS
--------------------------------------
AHB OCRAM0x00000000
AHB USBCTRL00x80080000
AHB OCROM0xC0000000
Quoted 4 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi J?rg,
Am 23.04.2016 um 12:33 schrieb J?rg Krause:
Quoted 76 lines
Hi Stefan,
Quoted 68 lines · J?rg Krause
Hi Stefan,
Quoted 53 lines · Stefan Wahren
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.dtsibased on the patch below. Unfortunately
the
dtc give me some strang errors:ERROR (
duplicate_label): Duplicate label 'mac0' on
/ahb at 80080000/ethernet at800f0000and /ahb at 00000000/ethernet at800f0000
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---------------------------------------
arch/arm/boot/dts/imx28.dtsi +7
-2@@ -1311,13 +1311,18 @@ }; }; - ahb at 80080000 { + ahb at 00000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - reg = <0x80080000 0x80000>; + reg = <0x00000000 0x20000>, <0x80080000 0x80000>; ranges; + ocram: sram at 00000000 { + compatible = "mmio-sram"; + reg = <0x00000000 0x20000>; + }; + usb0: usb at 80080000 { compatible = "fsl,imx28-usb", "fsl,imx27- usb";Quoted 1 line
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 OCRAM0x00000000
AHB USBCTRL00x80080000
AHB OCROM0xC0000000Quoted 4 lines
So instead of replacing ahb at 80080000 by ahb at 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".
Quoted 5 lines
Sorry, for not looking carefully enough at your patch. Haven't seen you adjusted the 'reg' property. I tried with an additional ahb at 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
Quoted 4 lines
Best regards
J?rg Krause
Quoted 17 lines · On Monday 25 April 2016 08:04:53 Stefan Wahren wrote:
Quoted 17 lines
Quoted 16 lines
Quoted 1 line
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 0xC0000000So 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".
Quoted 8 lines
Quoted 5 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Arnd,
Am 25.04.2016 um 15:06 schrieb Arnd Bergmann:
Quoted 7 lines · On Monday 25 April 2016 08:04:53 Stefan Wahren wrote:
Quoted 3 lines
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?
Quoted 2 lines
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
Quoted 3 lines
Arnd
Quoted 10 lines · On Wednesday 27 April 2016 22:16:42 Stefan Wahren wrote:
Am 25.04.2016 um 15:06 schrieb Arnd Bergmann:
Quoted 7 lines · On Monday 25 April 2016 08:04:53 Stefan Wahren wrote:
Quoted 3 lines
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.
Quoted 1 line
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html