Skip to contentSkip to conversation

FDT for MPC5200, CPU revision, MSCAN

DISCUSSION Wolfgang Grandegger 2 participants 4 messages Apr 20, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

is there a way to distinguish the CPU revision (Rev.A vs. Rev.B) of the MPC5200, preferably at run time? Or should this be defined in the FDT? I ask, because some settings depend on the CPU revision due to hardware bugs, like the clock source used for MSCAN.

Thanks.

Wolfgang.

#1 lore raw
Quoted 4 lines · Wolfgang Grandegger

Hello,

is there a way to distinguish the CPU revision (Rev.A vs. Rev.B) of the MPC5200, preferably at run time? Or should this be defined in the FDT? I ask, because some settings depend on the CPU revision due to hardware bugs, like the clock source used for MSCAN.

I found the information here:

$ cat Documentation/powerpc/mpc52xx-device-tree-bindings.txt
...
The 5200B is almost the same as the 5200, but not quite.  It fixes
silicon bugs and it adds a small number of enhancements.  Most of the
devices either provide exactly the same interface as on the 5200.  A few
devices have extra functions but still have a backwards compatible mode.
To express this infomation as completely as possible, 5200B device trees
should have two items in the compatible list;
"mpc5200b-<device>\0mpc5200-<device>".  It is *strongly* recommended
that 5200B device trees follow this convention (instead of only listing
the base mpc5200 item).
...

Sorry for the noise.

Wolfgang.

#2 lore raw
Quoted 7 lines · Wolfgang Grandegger
Quoted 6 lines · Wolfgang Grandegger

Hello,

is there a way to distinguish the CPU revision (Rev.A vs. Rev.B) of the MPC5200, preferably at run time? Or should this be defined in the FDT? I ask, because some settings depend on the CPU revision due to hardware bugs, like the clock source used for MSCAN.

This stuff is defined in the device tree. If you need to detect the version at runtime, then ideally your bootloader will read the PVR/SVR to determine the chip version and then pass the correct FDT to the kernel.

Quoted 3 lines

I found the information here:

$ cat Documentation/powerpc/mpc52xx-device-tree-bindings.txt

<snip>

Quoted 1 line

Sorry for the noise.

Not noise; good question.

g.

Signature · 4 lines
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
[email protected]
(403) 399-0195
#3 lore raw
Quoted 9 lines · Grant Likely
Quoted 7 lines · Wolfgang Grandegger
Quoted 6 lines · Wolfgang Grandegger

Hello,

is there a way to distinguish the CPU revision (Rev.A vs. Rev.B) of the MPC5200, preferably at run time? Or should this be defined in the FDT? I ask, because some settings depend on the CPU revision due to hardware bugs, like the clock source used for MSCAN.

Quoted 4 lines

This stuff is defined in the device tree. If you need to detect the version at runtime, then ideally your bootloader will read the PVR/SVR to determine the chip version and then pass the correct FDT to the kernel.

OK, I already realized the revision field in the DTS.

Quoted 7 lines
Quoted 3 lines

I found the information here:

$ cat Documentation/powerpc/mpc52xx-device-tree-bindings.txt

<snip>

Quoted 1 line

Sorry for the noise.

Not noise; good question.

OK, then more questions for MSCAN related properties. The clock source for MSCAN is either derived from IPB or directly from the oscillator clock via CLKSRC bit. I guess that the property "system-clock" should provide that frequency:

$ cat Documentation/powerpc/mpc52xx-device-tree-bindings.txt
...
system-frequency        int             Fsystem frequency; source of all
                                        other clocks.

It needs also to be defined by the boot loader.

Thanks.

Wolfgang.