* DTS question
@ 2008-03-20 21:33 Sean MacLennan
2008-03-20 21:47 ` Segher Boessenkool
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Sean MacLennan @ 2008-03-20 21:33 UTC (permalink / raw)
To: linuxppc-dev
The warp has an AD7414 chip hanging off the I2C bus. This chip can
raise an interrupt when it crosses a critical threshold.
This interrupt is tied to IRQ2 from the processor. What is the best
way to describe this interrupt in the DTS?
The warp.dts is available on request, but the one in the for-2.6.25
tree is relatively up to date.
Cheers,
Sean
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-20 21:33 Sean MacLennan
@ 2008-03-20 21:47 ` Segher Boessenkool
2008-03-20 21:48 ` Scott Wood
2008-03-20 22:19 ` Sean MacLennan
2 siblings, 0 replies; 20+ messages in thread
From: Segher Boessenkool @ 2008-03-20 21:47 UTC (permalink / raw)
To: Sean MacLennan; +Cc: linuxppc-dev@ozlabs.org
> The warp has an AD7414 chip hanging off the I2C bus. This chip can
> raise an interrupt when it crosses a critical threshold.
>
> This interrupt is tied to IRQ2 from the processor.
No it's not. PowerPC has only one interrupt [*]. You probably
mean it is tied to IRQ2 on your "main" interrupt controller?
> What is the best
> way to describe this interrupt in the DTS?
You set the "interrupts" property to contain a description for
this interrupt: likely simply <2 sense>. The exact format (and
the values for "sense") depend on the exact kind of interrupt
controller.
If there is weird interrupt routing, you might need to set an
"interrupt-parent" property as well, pointing to this interrupt
controller.
Segher
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-20 21:33 Sean MacLennan
2008-03-20 21:47 ` Segher Boessenkool
@ 2008-03-20 21:48 ` Scott Wood
2008-03-20 22:19 ` Sean MacLennan
2 siblings, 0 replies; 20+ messages in thread
From: Scott Wood @ 2008-03-20 21:48 UTC (permalink / raw)
To: Sean MacLennan; +Cc: linuxppc-dev@ozlabs.org
Sean MacLennan wrote:
> The warp has an AD7414 chip hanging off the I2C bus. This chip can
> raise an interrupt when it crosses a critical threshold.
>
> This interrupt is tied to IRQ2 from the processor. What is the best
> way to describe this interrupt in the DTS?
>
> The warp.dts is available on request, but the one in the for-2.6.25
> tree is relatively up to date.
Add a node for the ad7414 under the i2c bus, and put the interrupt
specifier there. For best results, convert the ad7414 driver into a
new-style i2c driver.
-Scott
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-20 21:33 Sean MacLennan
2008-03-20 21:47 ` Segher Boessenkool
2008-03-20 21:48 ` Scott Wood
@ 2008-03-20 22:19 ` Sean MacLennan
2008-03-20 22:26 ` Scott Wood
2 siblings, 1 reply; 20+ messages in thread
From: Sean MacLennan @ 2008-03-20 22:19 UTC (permalink / raw)
To: linuxppc-dev
Ok, here is what I did....
IIC0: i2c@ef600700 {
compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
reg = <ef600700 14>;
interrupt-parent = <&UIC0>;
interrupts = <2 4>;
index = <0>;
ad7414 {
compatible = "ad7414";
interrupts = <19 8>;
interrupt-parent = <&UIC0>;
};
};
Comments?
Cheers,
Sean
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-20 22:19 ` Sean MacLennan
@ 2008-03-20 22:26 ` Scott Wood
2008-03-21 4:12 ` Sean MacLennan
0 siblings, 1 reply; 20+ messages in thread
From: Scott Wood @ 2008-03-20 22:26 UTC (permalink / raw)
To: Sean MacLennan; +Cc: linuxppc-dev
Sean MacLennan wrote:
> Ok, here is what I did....
>
> IIC0: i2c@ef600700 {
> compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
> reg = <ef600700 14>;
> interrupt-parent = <&UIC0>;
> interrupts = <2 4>;
> index = <0>;
>
> ad7414 {
> compatible = "ad7414";
This should proabably have a manufacturer prefix.
> interrupts = <19 8>;
> interrupt-parent = <&UIC0>;
> };
Should have a reg property indicating the i2c address, and
#address-cells = <1>/#size-cells = <0> in the i2c controller node.
-Scott
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-20 22:26 ` Scott Wood
@ 2008-03-21 4:12 ` Sean MacLennan
2008-03-21 4:34 ` Grant Likely
0 siblings, 1 reply; 20+ messages in thread
From: Sean MacLennan @ 2008-03-21 4:12 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
On Thu, 20 Mar 2008 17:26:42 -0500
"Scott Wood" <scottwood@freescale.com> wrote:
> > ad7414 {
> > compatible = "ad7414";
>
> This should proabably have a manufacturer prefix.
I wondered about this. Since the AD from Analog Devices is built into
the part number, I didn't know if it was needed. And analog-devices is
pretty long ;)
But I am willing to put it in if it is necessary.
Cheers,
Sean
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-21 4:12 ` Sean MacLennan
@ 2008-03-21 4:34 ` Grant Likely
2008-03-21 5:09 ` Sean MacLennan
2008-03-21 11:31 ` Segher Boessenkool
0 siblings, 2 replies; 20+ messages in thread
From: Grant Likely @ 2008-03-21 4:34 UTC (permalink / raw)
To: Sean MacLennan; +Cc: Scott Wood, linuxppc-dev
On Thu, Mar 20, 2008 at 10:12 PM, Sean MacLennan
<smaclennan@pikatech.com> wrote:
> On Thu, 20 Mar 2008 17:26:42 -0500
> "Scott Wood" <scottwood@freescale.com> wrote:
>
> > > ad7414 {
> > > compatible = "ad7414";
> >
> > This should proabably have a manufacturer prefix.
>
> I wondered about this. Since the AD from Analog Devices is built into
> the part number, I didn't know if it was needed. And analog-devices is
> pretty long ;)
>
> But I am willing to put it in if it is necessary.
Convention is to use the stock ticker symbol. If the company is
private and has no stock ticker symbol, then the company name should
be used.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-21 4:34 ` Grant Likely
@ 2008-03-21 5:09 ` Sean MacLennan
2008-03-21 7:05 ` David Gibson
2008-03-21 11:31 ` Segher Boessenkool
1 sibling, 1 reply; 20+ messages in thread
From: Sean MacLennan @ 2008-03-21 5:09 UTC (permalink / raw)
To: Grant Likely; +Cc: Scott Wood, linuxppc-dev
On Thu, 20 Mar 2008 22:34:21 -0600
"Grant Likely" <grant.likely@secretlab.ca> wrote:
> Convention is to use the stock ticker symbol. If the company is
> private and has no stock ticker symbol, then the company name should
> be used.
I didn't know that. ADI it is then.
IIC0: i2c@ef600700 {
compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
reg = <ef600700 14>;
interrupt-parent = <&UIC0>;
interrupts = <2 4>;
index = <0>;
#address-cells = <1>;
#size-cells = <0>;
ad7414@4a {
compatible = "adi,ad7414";
reg = <4a>;
interrupts = <19 8>;
interrupt-parent = <&UIC0>;
};
};
Cheers,
Sean
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-21 5:09 ` Sean MacLennan
@ 2008-03-21 7:05 ` David Gibson
2008-03-21 11:35 ` Segher Boessenkool
0 siblings, 1 reply; 20+ messages in thread
From: David Gibson @ 2008-03-21 7:05 UTC (permalink / raw)
To: Sean MacLennan; +Cc: Scott Wood, linuxppc-dev
On Fri, Mar 21, 2008 at 01:09:41AM -0400, Sean MacLennan wrote:
> On Thu, 20 Mar 2008 22:34:21 -0600
> "Grant Likely" <grant.likely@secretlab.ca> wrote:
>
> > Convention is to use the stock ticker symbol. If the company is
> > private and has no stock ticker symbol, then the company name should
> > be used.
>
> I didn't know that. ADI it is then.
Well.. stock ticker is the new convention. IEEE1275 used IEEE
assigned OUI strings (Organization Unique Identifiers). Often those
are the same as the stock ticker, but not always.
Stock ticker is a good choice for new things, but for anything from a
vendor which has existing 1275 bindings for its products, I think we
should keep the original assigned OUI, even if it differs from the
stock ticker.
--
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] 20+ messages in thread
* Re: DTS question
2008-03-21 4:34 ` Grant Likely
2008-03-21 5:09 ` Sean MacLennan
@ 2008-03-21 11:31 ` Segher Boessenkool
1 sibling, 0 replies; 20+ messages in thread
From: Segher Boessenkool @ 2008-03-21 11:31 UTC (permalink / raw)
To: Grant Likely; +Cc: Scott Wood, linuxppc-dev, Sean MacLennan
>> I wondered about this. Since the AD from Analog Devices is built into
>> the part number, I didn't know if it was needed. And analog-devices
>> is
>> pretty long ;)
>>
>> But I am willing to put it in if it is necessary.
>
> Convention is to use the stock ticker symbol. If the company is
> private and has no stock ticker symbol, then the company name should
> be used.
The three forms are, in order of preference:
0NNNNNN with NNNNNN the (hexadecimal) OUI;
ABCDE (uppercase stock symbol);
abcde (any name that cannot be confused for the other two forms;
usually by making it lowercase).
The preference is in this order because OUI _is_ unique, stock ticker
will likely be unique (but not always!), and for random names there
is no guarantee or assurance at all.
I've never actually seen the OUI used, it's not very user-friendly ;-)
Segher
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-21 7:05 ` David Gibson
@ 2008-03-21 11:35 ` Segher Boessenkool
2008-03-25 22:12 ` David Gibson
0 siblings, 1 reply; 20+ messages in thread
From: Segher Boessenkool @ 2008-03-21 11:35 UTC (permalink / raw)
To: David Gibson; +Cc: Scott Wood, linuxppc-dev, Sean MacLennan
>>> Convention is to use the stock ticker symbol. If the company is
>>> private and has no stock ticker symbol, then the company name should
>>> be used.
>>
>> I didn't know that. ADI it is then.
>
> Well.. stock ticker is the new convention. IEEE1275 used IEEE
> assigned OUI strings (Organization Unique Identifiers). Often those
> are the same as the stock ticker, but not always.
Erm, an OUI is a 24-bit number. I think you're confusing something
here.
> Stock ticker is a good choice for new things, but for anything from a
> vendor which has existing 1275 bindings for its products, I think we
> should keep the original assigned OUI, even if it differs from the
> stock ticker.
Yes, when there is an existing binding, obviously you should use what
it says (unless that binding is *completely* broken). Compatibility
is good.
Note that a stock symbol needs to be written in uppercase; in lowercase,
it is just a random name that has no collision protection.
Segher
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-21 11:35 ` Segher Boessenkool
@ 2008-03-25 22:12 ` David Gibson
2008-03-26 15:32 ` Segher Boessenkool
0 siblings, 1 reply; 20+ messages in thread
From: David Gibson @ 2008-03-25 22:12 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Scott Wood, linuxppc-dev, Sean MacLennan
On Fri, Mar 21, 2008 at 12:35:39PM +0100, Segher Boessenkool wrote:
>>>> Convention is to use the stock ticker symbol. If the company is
>>>> private and has no stock ticker symbol, then the company name should
>>>> be used.
>>>
>>> I didn't know that. ADI it is then.
>>
>> Well.. stock ticker is the new convention. IEEE1275 used IEEE
>> assigned OUI strings (Organization Unique Identifiers). Often those
>> are the same as the stock ticker, but not always.
>
> Erm, an OUI is a 24-bit number. I think you're confusing something
> here.
Yes, I think I am. I somehow had the impression that in addition to
the 24-bit OUIs used in MAC addresses, there were also string-form
OUIs assigned.
>> Stock ticker is a good choice for new things, but for anything from a
>> vendor which has existing 1275 bindings for its products, I think we
>> should keep the original assigned OUI, even if it differs from the
>> stock ticker.
>
> Yes, when there is an existing binding, obviously you should use what
> it says (unless that binding is *completely* broken). Compatibility
> is good.
>
> Note that a stock symbol needs to be written in uppercase; in lowercase,
> it is just a random name that has no collision protection.
Um.. bit too late for that. AFAIK, uppercase has been used by
*no-one* for stock ticker derived vendor IDs.
--
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] 20+ messages in thread
* Re: DTS question
2008-03-25 22:12 ` David Gibson
@ 2008-03-26 15:32 ` Segher Boessenkool
2008-03-26 23:40 ` David Gibson
0 siblings, 1 reply; 20+ messages in thread
From: Segher Boessenkool @ 2008-03-26 15:32 UTC (permalink / raw)
To: David Gibson; +Cc: Scott Wood, linuxppc-dev, Sean MacLennan
>>> Well.. stock ticker is the new convention. IEEE1275 used IEEE
>>> assigned OUI strings (Organization Unique Identifiers). Often those
>>> are the same as the stock ticker, but not always.
>>
>> Erm, an OUI is a 24-bit number. I think you're confusing something
>> here.
>
> Yes, I think I am. I somehow had the impression that in addition to
> the 24-bit OUIs used in MAC addresses, there were also string-form
> OUIs assigned.
Perhaps, I'm not an expert on this organisational stuff (wow, big
understatement). OF uses only the six-hex-digit form though (with
a prepended 0, to make it unique).
>> Note that a stock symbol needs to be written in uppercase; in
>> lowercase,
>> it is just a random name that has no collision protection.
>
> Um.. bit too late for that. AFAIK, uppercase has been used by
> *no-one* for stock ticker derived vendor IDs.
No, it's used quite a lot actually. Not in DTS files though ;-)
It doesn't matter a lot, lowercase names are perfectly valid, you just
don't get the nice non-collision reassurance you would get if you used
a name in one of the namespaces reserved for that purpose.
It's probably best to not use an uppercase stock symbol if you don't
have approval from the company in question anyway -- we use a
lowercase name (i.e. in the "free-for-all" space) for our messed up
bindings, the companies use an uppercase name (in the stock-ticker
namespace) for their own, incompatible, messed-up bindings, and
everyone is happy. Or something like that.
Segher
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-03-26 15:32 ` Segher Boessenkool
@ 2008-03-26 23:40 ` David Gibson
2008-03-27 3:42 ` Sean MacLennan
0 siblings, 1 reply; 20+ messages in thread
From: David Gibson @ 2008-03-26 23:40 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Scott Wood, linuxppc-dev, Sean MacLennan
On Wed, Mar 26, 2008 at 04:32:28PM +0100, Segher Boessenkool wrote:
>>>> Well.. stock ticker is the new convention. IEEE1275 used IEEE
>>>> assigned OUI strings (Organization Unique Identifiers). Often those
>>>> are the same as the stock ticker, but not always.
>>>
>>> Erm, an OUI is a 24-bit number. I think you're confusing something
>>> here.
>>
>> Yes, I think I am. I somehow had the impression that in addition to
>> the 24-bit OUIs used in MAC addresses, there were also string-form
>> OUIs assigned.
>
> Perhaps, I'm not an expert on this organisational stuff (wow, big
> understatement). OF uses only the six-hex-digit form though (with
> a prepended 0, to make it unique).
>
>>> Note that a stock symbol needs to be written in uppercase; in lowercase,
>>> it is just a random name that has no collision protection.
>>
>> Um.. bit too late for that. AFAIK, uppercase has been used by
>> *no-one* for stock ticker derived vendor IDs.
>
> No, it's used quite a lot actually. Not in DTS files though ;-)
Sorry, yes, I was meaning specifically in recent, flattened-device
tree practice (which is the context in which the "use stock ticker"
recommendation has been made.
> It doesn't matter a lot, lowercase names are perfectly valid, you just
> don't get the nice non-collision reassurance you would get if you used
> a name in one of the namespaces reserved for that purpose.
>
> It's probably best to not use an uppercase stock symbol if you don't
> have approval from the company in question anyway -- we use a
> lowercase name (i.e. in the "free-for-all" space) for our messed up
> bindings, the companies use an uppercase name (in the stock-ticker
> namespace) for their own, incompatible, messed-up bindings, and
> everyone is happy. Or something like that.
--
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] 20+ messages in thread
* Re: DTS question
2008-03-26 23:40 ` David Gibson
@ 2008-03-27 3:42 ` Sean MacLennan
0 siblings, 0 replies; 20+ messages in thread
From: Sean MacLennan @ 2008-03-27 3:42 UTC (permalink / raw)
To: David Gibson; +Cc: Scott Wood, linuxppc-dev
On Thu, 27 Mar 2008 10:40:43 +1100
"David Gibson" <david@gibson.dropbear.id.au> wrote:
> >>> Note that a stock symbol needs to be written in uppercase; in
> >>> lowercase, it is just a random name that has no collision
> >>> protection.
> >>
> >> Um.. bit too late for that. AFAIK, uppercase has been used by
> >> *no-one* for stock ticker derived vendor IDs.
> >
> > No, it's used quite a lot actually. Not in DTS files though ;-)
>
> Sorry, yes, I was meaning specifically in recent, flattened-device
> tree practice (which is the context in which the "use stock ticker"
> recommendation has been made.
>
> > It doesn't matter a lot, lowercase names are perfectly valid, you
> > just don't get the nice non-collision reassurance you would get if
> > you used a name in one of the namespaces reserved for that purpose.
> >
> > It's probably best to not use an uppercase stock symbol if you don't
> > have approval from the company in question anyway -- we use a
> > lowercase name (i.e. in the "free-for-all" space) for our messed up
> > bindings, the companies use an uppercase name (in the stock-ticker
> > namespace) for their own, incompatible, messed-up bindings, and
> > everyone is happy. Or something like that.
Ack, now I am confused. Should I use lower or upper case?
To be honest the upper case looks weird since none of the other names
have any uppercase characters.
Cheers,
Sean
^ permalink raw reply [flat|nested] 20+ messages in thread
* DTS question
@ 2008-09-02 21:56 Gary Thomas
2008-09-02 23:42 ` David Gibson
2008-09-02 23:43 ` Scott Wood
0 siblings, 2 replies; 20+ messages in thread
From: Gary Thomas @ 2008-09-02 21:56 UTC (permalink / raw)
To: Linuxppc-dev
Following on with my RTC problem, I cut&pasted this from
the TQM5200 dts file:
i2c@3d40 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,mpc5200-i2c","fsl-i2c";
reg = <0x3d40 0x40>;
interrupts = <2 16 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
rtc@68 {
device_type = "rtc";
compatible = "dallas,ds1307";
reg = <0x68>;
};
};
However, the dts file I started with had this (*mine*):
i2c@3d40 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,mpc5200-i2c","fsl-i2c";
cell-index = <1>;
reg = <3d40 40>;
interrupts = <2 10 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
};
Notice the different mix of hex (0xNNN) and implied hex values.
This is really confusing to me. Even more so when I added the
RTC snippet cut directly from the TQM5200 file:
rtc@68 {
device_type = "rtc";
compatible = "dallas,ds1307";
reg = <0x68>;
};
This yielded a syntax error when merged with my platform dts.
When I changed the 'reg=<0x68>' to 'reg=<68>', the syntax error
went away & it worked perfectly.
What gives? Why is explicit hex sometimes an error and sometimes not?
Is the format of this file documented anywhere (I've not found it)?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-09-02 21:56 DTS question Gary Thomas
@ 2008-09-02 23:42 ` David Gibson
2008-09-03 0:14 ` Gary Thomas
2008-09-02 23:43 ` Scott Wood
1 sibling, 1 reply; 20+ messages in thread
From: David Gibson @ 2008-09-02 23:42 UTC (permalink / raw)
To: Gary Thomas; +Cc: Linuxppc-dev
On Tue, Sep 02, 2008 at 03:56:30PM -0600, Gary Thomas wrote:
> Following on with my RTC problem, I cut&pasted this from
> the TQM5200 dts file:
> i2c@3d40 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "fsl,mpc5200-i2c","fsl-i2c";
> reg = <0x3d40 0x40>;
> interrupts = <2 16 0>;
> interrupt-parent = <&mpc5200_pic>;
> fsl5200-clocking;
>
> rtc@68 {
> device_type = "rtc";
> compatible = "dallas,ds1307";
> reg = <0x68>;
> };
> };
>
> However, the dts file I started with had this (*mine*):
> i2c@3d40 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "fsl,mpc5200-i2c","fsl-i2c";
> cell-index = <1>;
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> interrupt-parent = <&mpc5200_pic>;
> fsl5200-clocking;
> };
>
> Notice the different mix of hex (0xNNN) and implied hex values.
> This is really confusing to me. Even more so when I added the
> RTC snippet cut directly from the TQM5200 file:
>
> rtc@68 {
> device_type = "rtc";
> compatible = "dallas,ds1307";
> reg = <0x68>;
> };
>
> This yielded a syntax error when merged with my platform dts.
> When I changed the 'reg=<0x68>' to 'reg=<68>', the syntax error
> went away & it worked perfectly.
>
> What gives? Why is explicit hex sometimes an error and sometimes not?
Because we changed the format at one point. Originally (the "dts-v0"
format) it was implicitly hex everywhere, which turned out to be a
mistake. So we introduced the new dts-v1 format which uses C-style
literals. New-style files are marked with a /dts-v1/; token at the
top of the file.
> Is the format of this file documented anywhere (I've not found it)?
It's in Documentation/dts-format.txt in the dtc tree. I don't think
that's been included in the version of dtc in the kernel tree, though,
so you'll need to download the standalone dtc.
--
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] 20+ messages in thread
* Re: DTS question
2008-09-02 21:56 DTS question Gary Thomas
2008-09-02 23:42 ` David Gibson
@ 2008-09-02 23:43 ` Scott Wood
1 sibling, 0 replies; 20+ messages in thread
From: Scott Wood @ 2008-09-02 23:43 UTC (permalink / raw)
To: Gary Thomas; +Cc: Linuxppc-dev
On Tue, Sep 02, 2008 at 03:56:30PM -0600, Gary Thomas wrote:
> What gives? Why is explicit hex sometimes an error and sometimes not?
> Is the format of this file documented anywhere (I've not found it)?
If the file has /dts-v1/; at the top, it uses version 1 of the device
tree syntax, which has C-like numerical constants. Without it, you get
version zero syntax, with implicit hex.
-Scott
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-09-02 23:42 ` David Gibson
@ 2008-09-03 0:14 ` Gary Thomas
2008-09-03 0:25 ` David Gibson
0 siblings, 1 reply; 20+ messages in thread
From: Gary Thomas @ 2008-09-03 0:14 UTC (permalink / raw)
To: Linuxppc-dev
David Gibson wrote:
> On Tue, Sep 02, 2008 at 03:56:30PM -0600, Gary Thomas wrote:
<snip>
>> What gives? Why is explicit hex sometimes an error and sometimes not?
>
> Because we changed the format at one point. Originally (the "dts-v0"
> format) it was implicitly hex everywhere, which turned out to be a
> mistake. So we introduced the new dts-v1 format which uses C-style
> literals. New-style files are marked with a /dts-v1/; token at the
> top of the file.
Gotcha, thanks. Not sure where I picked up the dts-v0 file I based
my platform on, but at least now I understand the magic.
>> Is the format of this file documented anywhere (I've not found it)?
>
> It's in Documentation/dts-format.txt in the dtc tree. I don't think
> that's been included in the version of dtc in the kernel tree, though,
> so you'll need to download the standalone dtc.
>
Where do I find this "dtc" tree?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: DTS question
2008-09-03 0:14 ` Gary Thomas
@ 2008-09-03 0:25 ` David Gibson
0 siblings, 0 replies; 20+ messages in thread
From: David Gibson @ 2008-09-03 0:25 UTC (permalink / raw)
To: Gary Thomas; +Cc: Linuxppc-dev
On Tue, Sep 02, 2008 at 06:14:38PM -0600, Gary Thomas wrote:
> David Gibson wrote:
>> On Tue, Sep 02, 2008 at 03:56:30PM -0600, Gary Thomas wrote:
> <snip>
>>> What gives? Why is explicit hex sometimes an error and sometimes not?
>>
>> Because we changed the format at one point. Originally (the "dts-v0"
>> format) it was implicitly hex everywhere, which turned out to be a
>> mistake. So we introduced the new dts-v1 format which uses C-style
>> literals. New-style files are marked with a /dts-v1/; token at the
>> top of the file.
>
> Gotcha, thanks. Not sure where I picked up the dts-v0 file I based
> my platform on, but at least now I understand the magic.
Well, it's only fairly recently that we converted all the in-kernel
files to v1, so you may have grabbed something before the conversion.
We're hoping to get everyone converted over to v1 as quickly as
possible, to avoid this sort of confusion.
>>> Is the format of this file documented anywhere (I've not found it)?
>>
>> It's in Documentation/dts-format.txt in the dtc tree. I don't think
>> that's been included in the version of dtc in the kernel tree, though,
>> so you'll need to download the standalone dtc.
>>
>
> Where do I find this "dtc" tree?
git://git.jdl.com/software/dtc.git
Or get tarballs from
http://jdl.com/software/
--
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] 20+ messages in thread
end of thread, other threads:[~2008-09-03 0:25 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-02 21:56 DTS question Gary Thomas
2008-09-02 23:42 ` David Gibson
2008-09-03 0:14 ` Gary Thomas
2008-09-03 0:25 ` David Gibson
2008-09-02 23:43 ` Scott Wood
-- strict thread matches above, loose matches on Subject: below --
2008-03-20 21:33 Sean MacLennan
2008-03-20 21:47 ` Segher Boessenkool
2008-03-20 21:48 ` Scott Wood
2008-03-20 22:19 ` Sean MacLennan
2008-03-20 22:26 ` Scott Wood
2008-03-21 4:12 ` Sean MacLennan
2008-03-21 4:34 ` Grant Likely
2008-03-21 5:09 ` Sean MacLennan
2008-03-21 7:05 ` David Gibson
2008-03-21 11:35 ` Segher Boessenkool
2008-03-25 22:12 ` David Gibson
2008-03-26 15:32 ` Segher Boessenkool
2008-03-26 23:40 ` David Gibson
2008-03-27 3:42 ` Sean MacLennan
2008-03-21 11:31 ` Segher Boessenkool
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).