How to add my device node in the device tree

2 messages, 2 authors, 2008-11-10 · open the first message on its own page

How to add my device node in the device tree

From: wael showair <hidden>
Date: 2008-11-07 22:53:02

Hi all,
My board processor is MPC8555, it is an AMC board.
i want to add a node for my device to the device tree.

simply here is the old device tree :
***************************************
/ {
	model = "MPC8555AMC";
	compatible = "mpc85xx";
	#address-cells = <1>;
	#size-cells = <1>;

	cpus {
		#cpus = <1>;
		#address-cells = <1>;
		#size-cells = <0>;

		PowerPC,8555@0 {
			device_type = "cpu";
			reg = <0>;
			d-cache-line-size = <20>;	// 32 bytes
			i-cache-line-size = <20>;	// 32 bytes
			d-cache-size = <8000>;		// L1, 32K
			i-cache-size = <8000>;		// L1, 32K
			timebase-frequency = <0>;	// 33 MHz, from uboot
			bus-frequency = <0>;		// From uboot
			clock-frequency = <0>;		// From uboot
			32-bit;
			linux,boot-cpu;
		};
	};

	memory {
		device_type = "memory";
		reg = <00000000 20000000>;	
	};

	soc8555@e0000000 {
		#address-cells = <1>;

141 more lines

Re: How to add my device node in the device tree

From: Scott Wood <hidden>
Date: 2008-11-10 23:19:25

wael showair wrote:
i want to add a node for the DMA in this tree. the PIC PDF tells me that DMA
channel 0 is connected to Internal interrupt number 4 so i add the following
node just before the pic node & after the serial node:

******************************************

		DMA@21100 {
			reg = <21100 44>;
			interrupts = <4 2>;  			interrupt-parent = <40000>;		
		};
******************************************
Copy the dma (eloplus) node in one of the existing device trees, rather than make up a new binding.  BTW, internal interrupts on the MPIC have to have 16 added to the interrupt number.
but when i called the of_find_node_by_name(NULL, "DMA");
unfortunately it returns NULL & i cant the a node with such a name.
i have checked this by printing all of the nodes in my tree which are:
cpus
PowerPC,8555
memory
soc8555
i2c
mdio
...
serial
pic
choosen
choosen

without a node of name DMA for sure.
so what else should i do to create this node?
thanks in advance for your help.
Not sure, are you sure you properly rebuilt the device tree, and are using the new blob rather than the old one?

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help