Skip to contentSkip to conversation

PCI example for device tree

DISCUSSION Grant Likely 2 participants 6 messages Jun 19, 2010 – Jul 8, 2010 7 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive

[cc'ing mailing list]

Quoted 5 lines · Stephan Gatzka

Hi Grant,

I complete the first version of the PCI bus mapping example. It is in the draft section of your wiki. Maybe you can just look into it and if you like it, put it into the main wiki page.

Hi Stephan,

Thanks for this work. That is useful. Before I take it out of draft, I'd like some changes to be made so that it better fits with the rest of the documents. I talked about it in an earlier email, but I don't know if you got it or not. Here's what I wrote:

Quoted 40 lines · Grant Likely
Quoted 7 lines · Stephan Gatzka

Hi Grant,

Quoted 5 lines

I've been doing a bit of work on some introductory level documentation of the flattened device tree. I've got a rough copy up on the devicetree.org wiki, and I could use some feedback. If anyone has some time to look at it, you can find it here:

Quoted 8 lines
Quoted 5 lines

http://devicetree.org/Device_Tree_Usage

Thanks,
g.

this looks good. Maybe an example of a complete host/PCI bridge might be helpful. Probably I can write something during the next week.

Hi Stephan,

I see that you started drafting some of this on the wiki. Thanks for the draft you've done so far. Some comments:

- Instead, of using an MPC5200 example, add a pci bus to the sample Coyote's Revenge system used in the rest of the page and describe that. The goal of this document is to lead a user step-by-step how each part of the device tree works. So, instead of plopping down the complete PCI bus node, the document should gradually build it up, and talk about each element as it is added. Focus on how it all works together.

- It would be useful to also show a PCI-to-PCI bridge, and maybe a fixed PCI device as children of the host bridge node.

- The current PCI nodes on all powerpc boards depend on a device_type = "PCI" property, but I'd like to look at moving away from that for new PCI controllers (device_type describes facilities in real open firmware. It shouldn't have any meaning in the flattened device tree). I need to look into the details though to see if it is feasible or not.

Quoted 6 lines

- Describing the interrupt-map property will be particularly fiddly. It could have a section all to itself before you even get to talking about PCI irq swizzling.

Thanks again for the help!
g.

The most important bit I think it to break up the adding of the PCI node so that it is built up piece by piece. For each element being discussed, I want a reader to be able to focus on just the properties that are involved.

Thanks,
g.

#4 lore raw
In reply to a message not in the archive

Hi Grant!

Quoted 6 lines

Hi Stephan,

Thanks for this work. That is useful. Before I take it out of draft, I'd like some changes to be made so that it better fits with the rest of the documents. I talked about it in an earlier email, but I don't know if you got it or not. Here's what I wrote:

No, unfortunately, I haven't read it.

Quoted 7 lines
Quoted 7 lines

- Instead, of using an MPC5200 example, add a pci bus to the sample Coyote's Revenge system used in the rest of the page and describe that. The goal of this document is to lead a user step-by-step how each part of the device tree works. So, instead of plopping down the complete PCI bus node, the document should gradually build it up, and talk about each element as it is added. Focus on how it all works together.

My intention was to describe a working example for a Host-to-PCI bridge. Of course it is possible to rework it to your imaginary example but again, I definitely prefer to do that for an existing board. Please just consider to write something about the interrupt-map property without having the schematics and a user manual for the SoC used. I can't explain it without the wiring of IDSEL lines and the mapping of IDSEL to device numbers in the PCI bridge.

Quoted 2 lines
Quoted 2 lines

- It would be useful to also show a PCI-to-PCI bridge,

OK, but maybe sometimes later.

Quoted 2 lines
Quoted 2 lines

and maybe a
fixed PCI device as children of the host bridge node.

OK, but I think at least for PCI the current policy is just to describe the bridge and leave the PCI devices up for PCI probing code. So adding a PCI device as a children might be a bit academically.

Quoted 5 lines

The most important bit I think it to break up the adding of the PCI node so that it is built up piece by piece. For each element being discussed, I want a reader to be able to focus on just the properties that are involved.

I have to think about it. My intention was more to explain what needs to be done for integrating a HOST-to-PCI bridge in a device tree and to describe the properties that are necessary for. There are some properties that belong together and I can't easily explain them stand-alone. That's the reason why I used colors to display the related properties.

I know that my sections breaks with the style you've used in the intro document. But I think for this complex PCI thing it is better to have a walk-through example.

Kind regards,

Stephan

_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

#8 lore raw
In reply to a message not in the archive
Quoted 5 lines · Stephan Gatzka

Hi Grant,

Maybe this is the best solution. Someone else writes a common PCI section for your imaginary board. In this section could be a link to my real world example (which is still useful, I think).

Hey Stephan. Took me a bit to get back to this, so sorry for the delay.

I really do like the text that you wrote, but I also needed something that fit in with the style and purpose of the rest of the text, specifically to be building up the PCI binding piece by piece. I spent some time editing it tonight and I think I'm happy with the way it turned out. It is still primarily your text, but reworked to suit the purpose of the document. There are probably still mistakes and typos in what I've written. I'll have to read it again when I'm not tired, and it isn't late at night, but feel free to take a look and make comments.

I'm totally fine with keeping your original text too on another page, and I do agree that it is useful. You can use the page history link to extract your old text and insert it into a new page. This is probably a good location for it:

http://www.devicetree.org/Compatible%3Dfsl,mpc5200-pci

Cheers, and thanks again for the good work.
g.

#10 lore raw
In reply to a message not in the archive

Hi Grant,

Quoted 9 lines

I really do like the text that you wrote, but I also needed something that fit in with the style and purpose of the rest of the text, specifically to be building up the PCI binding piece by piece. I spent some time editing it tonight and I think I'm happy with the way it turned out. It is still primarily your text, but reworked to suit the purpose of the document. There are probably still mistakes and typos in what I've written. I'll have to read it again when I'm not tired, and it isn't late at night, but feel free to take a look and make comments.

I'll go through the text after my vacation (about 3 weeks from now).

Kind regards,

Stephan

_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

#12 lore raw
In reply to a message not in the archive
Quoted 12 lines · Stephan Gatzka

Hi Grant,

Quoted 9 lines

I really do like the text that you wrote, but I also needed something that fit in with the style and purpose of the rest of the text, specifically to be building up the PCI binding piece by piece.  I spent some time editing it tonight and I think I'm happy with the way it turned out.  It is still primarily your text, but reworked to suit the purpose of the document.  There are probably still mistakes and typos in what I've written.  I'll have to read it again when I'm not tired, and it isn't late at night, but feel free to take a look and make comments.

Quoted 1 line

I'll go through the text after my vacation (about 3 weeks from now).

Okay, thanks.

g.