Skip to contentSkip to conversation

I2C and CAN bus on MPC5200B device tree

DISCUSSION Matt Sealey 6 participants 7 messages Jan 13, 2008 – Jan 14, 2008

lore
Share & tools
lore
#0 lore raw

Hi guys,

I know the I2C stuff is up in the air (I cannot pinpoint the documentation for it) and have not found any CAN bus documentation for device trees.

I want to update the firmware tree to add these but, am basically looking for those docs, or someone to go over a few points.. is there some kind of tree standard I should be looking at, or some patch I missed which has a driver which implements something that looks at a compatible tree?

Signature · 2 lines
Matt Sealey <[email protected]>
Genesi, Manager, Developer Relations
#1 lore raw
Quoted 10 lines · Matt Sealey

Hi guys,

I know the I2C stuff is up in the air (I cannot pinpoint the documentation for it) and have not found any CAN bus documentation for device trees.

I want to update the firmware tree to add these but, am basically looking for those docs, or someone to go over a few points.. is there some kind of tree standard I should be looking at, or some patch I missed which has a driver which implements something that looks at a compatible tree?

I think some consensus has been achieved for describing i2c busses and their attached devices, but I don't think booting-without-of.txt has been updated with the details yet. I need to look into that more.

I don't think anyone has tackled CAN. Best bet is to draft a tree in the way you think it should be described and post it to the list. That will give a starting point for us to discuss it and come to consensus.

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#2 lore raw
Quoted 7 lines · Grant Likely
Quoted 6 lines · Matt Sealey

Hi guys,

I know the I2C stuff is up in the air (I cannot pinpoint the documentation for it) and have not found any CAN bus documentation for device trees.

Quoted 8 lines
Quoted 4 lines

I want to update the firmware tree to add these but, am basically looking for those docs, or someone to go over a few points.. is there some kind of tree standard I should be looking at, or some patch I missed which has a driver which implements something that looks at a compatible tree?

I think some consensus has been achieved for describing i2c busses and their attached devices, but I don't think booting-without-of.txt has been updated with the details yet. I need to look into that more.

I think simple devices might have been agreed upon (but it's been a while since it was covered). Muxed busses probably hasn't. Either that or I completely missed the emails.

-Olof

#3 lore raw
Quoted 3 lines · Olof Johansson

I think simple devices might have been agreed upon (but it's been a while since it was covered). Muxed busses probably hasn't. Either that or I completely missed the emails.

I posted something in one of the i2c device tree threads a while ago:
http://ozlabs.org/pipermail/linuxppc-dev/2007-May/036353.html

Basically, you just have a node that is both an i2c device and an i2c controller, and the mux driver binds to it and registers the subordinate buses as new i2c controllers.

-Scott

#4 lore raw
In reply to Grant Likely
Quoted 11 lines · Grant Likely
Quoted 9 lines · Matt Sealey

Hi guys,

I know the I2C stuff is up in the air (I cannot pinpoint the documentation for it) and have not found any CAN bus documentation for device trees.

I want to update the firmware tree to add these but, am basically looking for those docs, or someone to go over a few points.. is there some kind of tree standard I should be looking at, or some patch I missed which has a driver which implements something that looks at a compatible tree?

Quoted 8 lines

I think some consensus has been achieved for describing i2c busses and their attached devices, but I don't think booting-without-of.txt has been updated with the details yet. I need to look into that more.

I don't think anyone has tackled CAN. Best bet is to draft a tree in the way you think it should be described and post it to the list. That will give a starting point for us to discuss it and come to consensus.

For MSCAN on the MPC5200 we currently have:

		mscan@900 {
			device_type = "mscan";
			compatible = "mpc5200b-mscan","mpc5200-mscan";
			cell-index = <0>;
			interrupts = <2 11 0>;
			interrupt-parent = <&mpc5200_pic>;
			reg = <900 80>;
		};

		mscan@980 {
			device_type = "mscan";
			compatible = "mpc5200b-mscan","mpc5200-mscan";
			cell-index = <1>;
			interrupts = <2 12 0>;
			interrupt-parent = <&mpc5200_pic>;
			reg = <980 80>;
		};

The only thing missing is a property defining the routing of the CAN signals, CAN 1 on I2C1 pins or CAN 2 on TMR01 pins. I think it does not make sense to describe CAN devices on the CAN bus like for I2C.

Wolfgang.

#5 lore raw
Quoted 41 lines · Wolfgang Grandegger
Quoted 11 lines · Grant Likely
Quoted 9 lines · Matt Sealey

Hi guys,

I know the I2C stuff is up in the air (I cannot pinpoint the documentation for it) and have not found any CAN bus documentation for device trees.

I want to update the firmware tree to add these but, am basically looking for those docs, or someone to go over a few points.. is there some kind of tree standard I should be looking at, or some patch I missed which has a driver which implements something that looks at a compatible tree?

Quoted 8 lines

I think some consensus has been achieved for describing i2c busses and their attached devices, but I don't think booting-without-of.txt has been updated with the details yet. I need to look into that more.

I don't think anyone has tackled CAN. Best bet is to draft a tree in the way you think it should be described and post it to the list. That will give a starting point for us to discuss it and come to consensus.

For MSCAN on the MPC5200 we currently have:

                mscan@900 {
                        device_type = "mscan";
                        compatible = "mpc5200b-mscan","mpc5200-mscan";
                        cell-index = <0>;
                        interrupts = <2 11 0>;
                        interrupt-parent = <&mpc5200_pic>;
                        reg = <900 80>;
                };

                mscan@980 {
                        device_type = "mscan";
                        compatible = "mpc5200b-mscan","mpc5200-mscan";
                        cell-index = <1>;
                        interrupts = <2 12 0>;
                        interrupt-parent = <&mpc5200_pic>;
                        reg = <980 80>;
                };
Quoted 3 lines

The only thing missing is a property defining the routing of the CAN signals, CAN 1 on I2C1 pins or CAN 2 on TMR01 pins. I think it does not make sense to describe CAN devices on the CAN bus like for I2C.

I don't think that pin routing matters much for the device tree. Ideally, firmware should be responsible for port_config, and as long as it is already configured, the CAN device can find it's devices.

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#6 lore raw
In reply to Wolfgang Grandegger
Quoted 21 lines · Wolfgang Grandegger
Quoted 11 lines · Grant Likely
Quoted 9 lines · Matt Sealey

Hi guys,

I know the I2C stuff is up in the air (I cannot pinpoint the documentation for it) and have not found any CAN bus documentation for device trees.

I want to update the firmware tree to add these but, am basically looking for those docs, or someone to go over a few points.. is there some kind of tree standard I should be looking at, or some patch I missed which has a driver which implements something that looks at a compatible tree?

Quoted 8 lines

I think some consensus has been achieved for describing i2c busses and their attached devices, but I don't think booting-without-of.txt has been updated with the details yet. I need to look into that more.

I don't think anyone has tackled CAN. Best bet is to draft a tree in the way you think it should be described and post it to the list. That will give a starting point for us to discuss it and come to consensus.

Quoted 4 lines

For MSCAN on the MPC5200 we currently have:

		mscan@900 {
			device_type = "mscan";

These device_type entries should not be here.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson