DTs, Linux drivers & PCI Devices

Saridakis, Dean (US SSA) dean.saridakis at baesystems.com
Sat Jan 26 03:30:32 EST 2013


I've been diving into Linux kernel drivers & device trees for a new project & am looking for some help. 

First, is it reasonable/possible to define a PCI (PCIe) device in a device tree? Seems like you'd have to reference a BAR#s to do this (& still have addresses mapped by enumeration).  A couple reasons I'm interested in doing this:
- The PCI device logic will be migrated to a system bus
- DT properties provide a nice way to pass in driver configuration data 

It's not clear to me how the linux kernel interprets/processes the device tree. I'm working w/ powerpc (fsl QorIQ). E.g., shouldn't everything from the DT show up in /sys/bus/platform/devices ? I noticed that not everything is there, e.g., only 2 of the 4 PCIe RCs. (Noticed this after trying to add my own simple dummy entry to a reserved reg space as an experiment).

Ultimately I'd like to use the DT to describe a set of logic cores on a subordinate bus. There is also a subordinate interrupt controller, which I think I can figure out how to describe, but am not sure how kernel glue works -- somehow I'd need to bind that controller to routing code I provide. 

Documentation I've been reading includes:
- ePAPR
- DT wiki
- kernel doc (driver-model, devicetree)
- Linux DDs v3 (no coverage of platform drivers)
Any other recommended docs?

Thanks,
Dean 



More information about the devicetree-discuss mailing list