* How complete should the DTS be? @ 2008-01-08 2:07 Sean MacLennan 2008-01-08 6:04 ` Kumar Gala 0 siblings, 1 reply; 7+ messages in thread From: Sean MacLennan @ 2008-01-08 2:07 UTC (permalink / raw) To: linuxppc-dev Just a general question about DTS "completeness". Like all 440EP processors, the taco has two i2c buses. However, only one bus has anything connected to it. Should I show both bus entries in the DTS, or only the one that is used? I have generally only been showing the devices that are present. i.e. Only one emac, only one serial port. Is there a convention for this? Cheers, Sean ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How complete should the DTS be? 2008-01-08 2:07 How complete should the DTS be? Sean MacLennan @ 2008-01-08 6:04 ` Kumar Gala 2008-01-10 3:13 ` David Gibson 0 siblings, 1 reply; 7+ messages in thread From: Kumar Gala @ 2008-01-08 6:04 UTC (permalink / raw) To: Sean MacLennan; +Cc: linuxppc-dev On Jan 7, 2008, at 8:07 PM, Sean MacLennan wrote: > Just a general question about DTS "completeness". Like all 440EP > processors, the taco has two i2c buses. However, only one bus has > anything connected to it. > > Should I show both bus entries in the DTS, or only the one that is > used? > I have generally only been showing the devices that are present. i.e. > Only one emac, only one serial port. > > Is there a convention for this? The .dts should reflect the HW as its used. On some reference boards we might put out more info because of the various configs these types of boards can be setup in. However if something has a static config just describe that. So in your example of two i2c buses with only one connected, just describe the one that is used. - k ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How complete should the DTS be? 2008-01-08 6:04 ` Kumar Gala @ 2008-01-10 3:13 ` David Gibson 2008-01-10 5:53 ` Sean MacLennan 0 siblings, 1 reply; 7+ messages in thread From: David Gibson @ 2008-01-10 3:13 UTC (permalink / raw) To: Kumar Gala; +Cc: linuxppc-dev, Sean MacLennan On Tue, Jan 08, 2008 at 12:04:36AM -0600, Kumar Gala wrote: > > On Jan 7, 2008, at 8:07 PM, Sean MacLennan wrote: > > > Just a general question about DTS "completeness". Like all 440EP > > processors, the taco has two i2c buses. However, only one bus has > > anything connected to it. > > > > Should I show both bus entries in the DTS, or only the one that is > > used? > > I have generally only been showing the devices that are present. i.e. > > Only one emac, only one serial port. > > > > Is there a convention for this? > > The .dts should reflect the HW as its used. On some reference boards > we might put out more info because of the various configs these types > of boards can be setup in. However if something has a static config > just describe that. So in your example of two i2c buses with only one > connected, just describe the one that is used. Hrm... I'd say this is not something which has a firm convention yet. It's going to become more of an issue once we get a macros system for dtc, so the "440EP" macro would have all the devices, even if some are not connected on a given board. I'm contemplating suggesting that we adopt the "status" property from IEEE1275 to cover this. -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How complete should the DTS be? 2008-01-10 3:13 ` David Gibson @ 2008-01-10 5:53 ` Sean MacLennan 2008-01-10 6:02 ` David Gibson 0 siblings, 1 reply; 7+ messages in thread From: Sean MacLennan @ 2008-01-10 5:53 UTC (permalink / raw) To: Kumar Gala, linuxppc-dev David Gibson wrote: > Hrm... I'd say this is not something which has a firm convention yet. > It's going to become more of an issue once we get a macros system for > dtc, so the "440EP" macro would have all the devices, even if some are > not connected on a given board. > > I'm contemplating suggesting that we adopt the "status" property from > IEEE1275 to cover this. > > When I am laying out the dts, leaving out what isn't used makes the dts file cleaner, at least in my view. It doesn't hurt to have the second i2c bus there, but it also doesn't help and leaving it out points out that it is not used. When we get a macro system I assume the second i2c bus will be there but hidden by a macro. It will still be clean and shouldn't cause grief. Cheers, Sean ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How complete should the DTS be? 2008-01-10 5:53 ` Sean MacLennan @ 2008-01-10 6:02 ` David Gibson 2008-01-10 6:50 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 7+ messages in thread From: David Gibson @ 2008-01-10 6:02 UTC (permalink / raw) To: Sean MacLennan; +Cc: linuxppc-dev On Thu, Jan 10, 2008 at 12:53:57AM -0500, Sean MacLennan wrote: > David Gibson wrote: > > Hrm... I'd say this is not something which has a firm convention yet. > > It's going to become more of an issue once we get a macros system for > > dtc, so the "440EP" macro would have all the devices, even if some are > > not connected on a given board. > > > > I'm contemplating suggesting that we adopt the "status" property from > > IEEE1275 to cover this. > > > > > When I am laying out the dts, leaving out what isn't used makes the dts > file cleaner, at least in my view. It doesn't hurt to have the second > i2c bus there, but it also doesn't help and leaving it out points out > that it is not used. > > When we get a macro system I assume the second i2c bus will be there but > hidden by a macro. It will still be clean and shouldn't cause grief. Right, but if it is there we'll want to mark it as unused in some way so that the kernel doesn't waste resources attempting to drive it. -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How complete should the DTS be? 2008-01-10 6:02 ` David Gibson @ 2008-01-10 6:50 ` Benjamin Herrenschmidt 2008-01-10 13:58 ` Josh Boyer 0 siblings, 1 reply; 7+ messages in thread From: Benjamin Herrenschmidt @ 2008-01-10 6:50 UTC (permalink / raw) To: David Gibson; +Cc: linuxppc-dev, Sean MacLennan On Thu, 2008-01-10 at 17:02 +1100, David Gibson wrote: > On Thu, Jan 10, 2008 at 12:53:57AM -0500, Sean MacLennan wrote: > > David Gibson wrote: > > > Hrm... I'd say this is not something which has a firm convention yet. > > > It's going to become more of an issue once we get a macros system for > > > dtc, so the "440EP" macro would have all the devices, even if some are > > > not connected on a given board. > > > > > > I'm contemplating suggesting that we adopt the "status" property from > > > IEEE1275 to cover this. > > > > > > > > When I am laying out the dts, leaving out what isn't used makes the dts > > file cleaner, at least in my view. It doesn't hurt to have the second > > i2c bus there, but it also doesn't help and leaving it out points out > > that it is not used. > > > > When we get a macro system I assume the second i2c bus will be there but > > hidden by a macro. It will still be clean and shouldn't cause grief. > > Right, but if it is there we'll want to mark it as unused in some way > so that the kernel doesn't waste resources attempting to drive it. Sure but I don't want to make it mandatory for people to put unused devices in. If the macro system brings them in, then yes, it's good to have a way to properly mark them unused. But people hand crafting DTS shouldn't have to bloat them. There is -one- case where you may want to put unused devices, is if you do some kind of resource management on that specific bus (like need to be able to dynamically allocate space on the bus). In this case, you want to know everything that's there and potentially decodes addresses to avoid collisions. Cheers, Ben. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How complete should the DTS be? 2008-01-10 6:50 ` Benjamin Herrenschmidt @ 2008-01-10 13:58 ` Josh Boyer 0 siblings, 0 replies; 7+ messages in thread From: Josh Boyer @ 2008-01-10 13:58 UTC (permalink / raw) To: benh; +Cc: linuxppc-dev, Sean MacLennan, David Gibson On Thu, 10 Jan 2008 17:50:49 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > > On Thu, 2008-01-10 at 17:02 +1100, David Gibson wrote: > > On Thu, Jan 10, 2008 at 12:53:57AM -0500, Sean MacLennan wrote: > > > David Gibson wrote: > > > > Hrm... I'd say this is not something which has a firm convention yet. > > > > It's going to become more of an issue once we get a macros system for > > > > dtc, so the "440EP" macro would have all the devices, even if some are > > > > not connected on a given board. > > > > > > > > I'm contemplating suggesting that we adopt the "status" property from > > > > IEEE1275 to cover this. > > > > > > > > > > > When I am laying out the dts, leaving out what isn't used makes the dts > > > file cleaner, at least in my view. It doesn't hurt to have the second > > > i2c bus there, but it also doesn't help and leaving it out points out > > > that it is not used. > > > > > > When we get a macro system I assume the second i2c bus will be there but > > > hidden by a macro. It will still be clean and shouldn't cause grief. > > > > Right, but if it is there we'll want to mark it as unused in some way > > so that the kernel doesn't waste resources attempting to drive it. > > Sure but I don't want to make it mandatory for people to put unused > devices in. If the macro system brings them in, then yes, it's good to > have a way to properly mark them unused. But people hand crafting DTS > shouldn't have to bloat them. > > There is -one- case where you may want to put unused devices, is if you > do some kind of resource management on that specific bus (like need to > be able to dynamically allocate space on the bus). In this case, you > want to know everything that's there and potentially decodes addresses > to avoid collisions. There are other uses too. E.g. pin sharing between devices based on DIP switch settings. You'd want to enumerate all the devices, and then add 'status = "failed-not-connected"' to the ones that don't have pins. josh ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-10 14:00 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-01-08 2:07 How complete should the DTS be? Sean MacLennan 2008-01-08 6:04 ` Kumar Gala 2008-01-10 3:13 ` David Gibson 2008-01-10 5:53 ` Sean MacLennan 2008-01-10 6:02 ` David Gibson 2008-01-10 6:50 ` Benjamin Herrenschmidt 2008-01-10 13:58 ` Josh Boyer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).