Add StorCenter DTS first draft.
Subsystems (2)
PATCH v3 1/3 Add StorCenter DTS first draft.
Based on the Kurobox DTS files.
--- arch/powerpc/boot/dts/storcenter.dts | 139 ++++++++++++++++++++++++++++++++++ 1 files changed, 139 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/storcenter.dts
arch/powerpc/boot/dts/storcenter.dts new file +139 -0
@@ -0,0 +1,139 @@ +/* + * Device Tree Source for IOMEGA StorCenter + * + * Copyright 2007 Oyvind Repvik + * Copyright 2007 Jon Loeliger + * + * Based on the Kurobox DTS by G. Liakhovetski <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +/ { + model = "StorCenter"; + compatible = "storcenter"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,8241@0 { + device_type = "cpu"; + reg = <0>; + clock-frequency = <d# 200000000>; /* Hz */ + timebase-frequency = <d# 25000000>; /* Hz */ + bus-frequency = <0>; /* from bootwrapper */ + i-cache-line-size = <d# 32>; /* bytes */ + d-cache-line-size = <d# 32>; /* bytes */ + i-cache-size = <4000>; + d-cache-size = <4000>; + }; + }; + + memory { + device_type = "memory"; + reg = <00000000 04000000>; /* 64MB @ 0x0 */ + }; + + soc@fc000000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + compatible = "fsl,mpc8241", "mpc10x"; + store-gathering = <0>; /* 0 == off, !0 == on */ + ranges = <0 fc000000 100000>; + reg = <fc000000 100000>; /* EUMB */ + bus-frequency = <0>; /* fixed by loader */ + + i2c@3000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl-i2c"; + reg = <3000 1000>; + interrupts = <5 2>; + interrupt-parent = <&mpic>; + + rtc@68 { + compatible = "dallas,ds1337"; + reg = <68>; + }; + }; + + serial0: serial@4500 { + cell-index = <0>; + device_type = "serial"; + compatible = "ns16550"; + reg = <4500 20>; + clock-frequency = <d# 97553800>; /* Hz */ + current-speed = <d# 115200>; + interrupts = <9 2>; + interrupt-parent = <&mpic>; + }; + + serial1: serial@4600 { + cell-index = <1>; + device_type = "serial"; + compatible = "ns16550"; + reg = <4600 20>; + clock-frequency = <d# 97553800>; /* Hz */ + current-speed = <d# 9600>; + interrupts = <a 2>; + interrupt-parent = <&mpic>; + }; + + mpic: interrupt-controller@40000 { + #interrupt-cells = <2>; + #address-cells = <0>; + device_type = "open-pic"; + compatible = "chrp,open-pic"; + interrupt-controller; + reg = <40000 40000>; + }; + + }; + + pci0: pci@fe800000 { + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + device_type = "pci"; + compatible = "mpc10x-pci"; + reg = <fe800000 1000>; + ranges = <01000000 0 0 fe000000 0 00c00000 + 02000000 0 80000000 80000000 0 70000000>; + bus-range = <0 ff>; + clock-frequency = <d# 97553800>; /* Hz */ + interrupt-parent = <&mpic>; + interrupt-map-mask = <f800 0 0 7>; + interrupt-map = < + /* IDSEL 13 - IDE */ + 6800 0 0 1 &mpic 0 1 + 6800 0 0 2 &mpic 0 1 + 6800 0 0 3 &mpic 0 1 + /* IDSEL 14 - USB */ + 7000 0 0 1 &mpic 0 1 + 7000 0 0 2 &mpic 0 1 + 7000 0 0 3 &mpic 0 1 + 7000 0 0 4 &mpic 0 1 + /* IDSEL 15 - ETH */ + 7800 0 0 1 &mpic 0 1 + 7800 0 0 2 &mpic 0 1 + 7800 0 0 3 &mpic 0 1 + 7800 0 0 4 &mpic 0 1 + >; + }; + + chosen { + linux,stdout-path = "/soc/serial@4500"; + }; +};
Signature · 1 line
1.5.4.rc0
Quoted 4 lines · Jon Loeliger
Based on the Kurobox DTS files.
Signed-off-by Andy Wilcox <[email protected]>Signed-off-by Jon Loeliger <[email protected]>
Comments below
arch/powerpc/boot/dts/storcenter.dts line 16
Quoted 4 lines
arch/powerpc/boot/dts/storcenter.dts new file +4
-0+ +/ { + model = "StorCenter"; + compatible = "storcenter";
Be specific! "iomega,storcenter". Even better if you put in the model number.
arch/powerpc/boot/dts/storcenter.dts line 51
Quoted 5 lines
arch/powerpc/boot/dts/storcenter.dts new file +5
-0+ + soc@fc000000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc";
device_type should be dropped (but I know that requires changes to the existing mpc82xx support code).
Quoted 1 line
+ compatible = "fsl,mpc8241", "mpc10x";
fsl,mpc8241-immr would be better; this node describes the internally memory mapped registers; not the entire soc.
arch/powerpc/boot/dts/storcenter.dts line 96
Quoted 4 lines
arch/powerpc/boot/dts/storcenter.dts new file +4
-0+ + mpic: interrupt-controller@40000 { + #interrupt-cells = <2>; + #address-cells = <0>;
Is #address-cells needed? There are no child nodes.
arch/powerpc/boot/dts/storcenter.dts line 137
Quoted 2 lines
arch/powerpc/boot/dts/storcenter.dts new file +2
-0+ chosen { + linux,stdout-path = "/soc/serial@4500";
/soc@fc000000/ perhaps?
Cheers,
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 6 lines · Grant Likely
Quoted 4 lines · Jon Loeliger
Based on the Kurobox DTS files.
Signed-off-by Andy Wilcox <[email protected]>Signed-off-by Jon Loeliger <[email protected]>
Quoted 8 lines
Comments below
arch/powerpc/boot/dts/storcenter.dts line 16
Quoted 4 lines
arch/powerpc/boot/dts/storcenter.dts new file +4
-0+ +/ { + model = "StorCenter"; + compatible = "storcenter";Be specific! "iomega,storcenter". Even better if you put in the model number.
As I mentioned vefore, there is no further model number. That _is_ the model name.
Quoted 8 lines
arch/powerpc/boot/dts/storcenter.dts line 51
Quoted 5 lines
arch/powerpc/boot/dts/storcenter.dts new file +5
-0+ + soc@fc000000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc";
device_typeshould be dropped (but I know that requires changes to the existing mpc82xx support code).
And when the code is fixed, we can fix the DTS too... :-)
Quoted 4 lines
Quoted 1 line
+ compatible = "fsl,mpc8241", "mpc10x";
fsl,mpc8241-immr would be better; this node describes the internally memory mapped registers; not the entire soc.
Uh, whatever? :-) 'Cuz how many other DTS files say that?
Quoted 6 lines
arch/powerpc/boot/dts/storcenter.dts line 96
Quoted 4 lines
arch/powerpc/boot/dts/storcenter.dts new file +4
-0+ + mpic: interrupt-controller@40000 { + #interrupt-cells = <2>; + #address-cells = <0>;Is #address-cells needed? There are no child nodes.
I thought so. Could be wrong.
Quoted 4 lines
arch/powerpc/boot/dts/storcenter.dts line 137
Quoted 2 lines
arch/powerpc/boot/dts/storcenter.dts new file +2
-0+ chosen { + linux,stdout-path = "/soc/serial@4500";/soc@fc000000/ perhaps?
Not really necessary to specify the unit number.
jdl
Quoted 16 lines · Jon Loeliger
Quoted 6 lines · Grant Likely
Quoted 4 lines · Jon Loeliger
Based on the Kurobox DTS files.
Signed-off-by Andy Wilcox <[email protected]>Signed-off-by Jon Loeliger <[email protected]>Quoted 8 lines
Comments below
arch/powerpc/boot/dts/storcenter.dts line 16
Quoted 4 lines
arch/powerpc/boot/dts/storcenter.dts new file +4
-0+ +/ { + model = "StorCenter"; + compatible = "storcenter";Be specific! "iomega,storcenter". Even better if you put in the model number.
Quoted 2 lines
As I mentioned vefore, there is no further model number. That _is_ the model name.
/me has a short memory.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
+ compatible = "fsl,mpc8241", "mpc10x";
fsl,mpc8241-immr would be better; this node describes the internally memory mapped registers; not the entire soc.
Uh, whatever? :-) 'Cuz how many other DTS files say that?
True, we haven't been doing this until recently; but we've also been stumbling about over the last 2 years figuring out how best to use this fancy device tree thing in embedded systems effectively. Best practices are starting to emerge (wadda you know, the open firmware recommended practices actually have good thought behind them) and being specific with the compatible property is one aspect. I'm moving the 5200 over to specifying -immr and some of the other soc ports are doing so also. Chat with Scott Wood.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
+ linux,stdout-path = "/soc/serial@4500";
/soc@fc000000/ perhaps?
Not really necessary to specify the unit number.
Okay, I wasn't sure if we could get away with that with the fdt.
Cheers,
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 7 lines
arch/powerpc/boot/dts/storcenter.dts line 96
Quoted 5 lines
arch/powerpc/boot/dts/storcenter.dts new file +4
-0+ + mpic: interrupt-controller@40000 { + #interrupt-cells = <2>; + #address-cells = <0>;Is #address-cells needed? There are no child nodes.
It's preferrable for interrupt controllers as #address-cells of the parent interrupt controller defines the size of the interrupt unit specifier in the child in the interrupt tree.
I think there's an ongoing argument as to whether the absence of #address-cells should be the same as #address-cells = 0 in that specific case but I'm not sure the code does the right thing so let's have it explicit.
Ben.
Quoted 8 lines · On Wed, 23 Jan 2008 11:33:16 +1100 Benjamin Herrenschmidt…
Quoted 7 lines
arch/powerpc/boot/dts/storcenter.dts line 96
Quoted 5 lines
arch/powerpc/boot/dts/storcenter.dts new file +4
-0+ + mpic: interrupt-controller@40000 { + #interrupt-cells = <2>; + #address-cells = <0>;Is #address-cells needed? There are no child nodes.
Quoted 8 lines
It's preferrable for interrupt controllers as #address-cells of the parent interrupt controller defines the size of the interrupt unit specifier in the child in the interrupt tree.
I think there's an ongoing argument as to whether the absence of #address-cells should be the same as #address-cells = 0 in that specific case but I'm not sure the code does the right thing so let's have it explicit.
The code doesn't handle the lack of #address-cells in nodes where there is an interrupt-map. It pukes if there is no reg property and addrsize != 0. In the absence of the #address-cells property, it will try to look at the parent's #address-cells, and if that lacks it, it will assign 2 which it then merrily decides is incorrect.
josh
Quoted 4 lines · Benjamin Herrenschmidt
I think there's an ongoing argument as to whether the absence of #address-cells should be the same as #address-cells = 0 in that specific case but I'm not sure the code does the right thing so let's have it explicit.
I've had no problems leaving it out.
-Scott