Re: Associating nodes with phandles for pci devices

2 messages, 2 authors, 2015-01-23 · open the first message on its own page

Re: Associating nodes with phandles for pci devices

From: Arnd Bergmann <hidden>
Date: 2015-01-23 19:15:06

On Friday 23 January 2015 19:02:33 Chris Packham wrote:
Hi,

I'm working on a new board that has a marvell,dsa switch. Similar to the kirkwood-mv88f6281gtw-ge board. However the major difference is that instead of being connected to an integrated Ethernet port it is connected via a PCI-e Ethernet port (basically a NIC hardwired onto the board).

Generally you don't need to define PCI devices in the .dts because the bus is scanned at run time and the method for identifying devices is well defined. But to satisfy the marvell,dsa binding[1] I need to tell it the Ethernet port it is connected to. The answer might be in the PCI bindings but the urls in the documentation[2] don't appear to be valid anymore.

Is it possible to enumerate PCI devices in the .dts? Or is there a way of satisfying the dsa requirements without knowing the Ethernet device?
In general, it is possible, and we do that on PowerPC, but it may be that
there are parts missing on ARM and you have to try it out.

In particular, you need to know the address of the PCI device and then
create a device node that will be associated with the pci_dev->dev.of_node
pointer.

	Arnd

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Associating nodes with phandles for pci devices

From: Chris Packham <hidden>
Date: 2015-01-23 19:38:12

Hi Arnd,

Thanks for the quick response (and sorry for the horribly formatted 
message, travelling with only a webmail interface at the moment).

On Fri, 23 Jan 2015, Arnd Bergmann wrote:
On Friday 23 January 2015 19:02:33 Chris Packham wrote:
quoted
Hi,

I'm working on a new board that has a marvell,dsa switch. Similar to 
the kirkwood-mv88f6281gtw-ge board. However the major difference is 
that instead of being connected to an integrated Ethernet port it is 
connected via a PCI-e Ethernet port (basically a NIC hardwired onto the 
board).

Generally you don't need to define PCI devices in the .dts because the 
bus is scanned at run time and the method for identifying devices is 
well defined. But to satisfy the marvell,dsa binding[1] I need to tell 
it the Ethernet port it is connected to. The answer might be in the PCI 
bindings but the urls in the documentation[2] don't appear to be valid 
anymore.

Is it possible to enumerate PCI devices in the .dts? Or is there a way 
of satisfying the dsa requirements without knowing the Ethernet device?
In general, it is possible, and we do that on PowerPC, but it may be that
there are parts missing on ARM and you have to try it out.

In particular, you need to know the address of the PCI device and then
create a device node that will be associated with the pci_dev->dev.of_node
pointer.
Encouraging to know. I think I can figure out the relevant addresses for 
my device based on the run-time scan.

Can you think of a good example. I found a few ppc boards that have an 
PCI-ISA bridge that get's enumerated in the .dts. I think I can make sense
of them but because they are bridges there's a lot of extra stuff for the 
down stream devices.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help