DTS question
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
Quoted 4 lines
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?
Quoted 2 lines
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
Quoted 8 lines · Sean MacLennan
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.dtsis 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
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
Quoted 11 lines · Sean MacLennan
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.
Quoted 3 lines
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
Quoted 4 lines · On Thu, 20 Mar 2008 17:26:42 -0500 "Scott Wood" <[email protected]> wrote:
Quoted 2 lines
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
Quoted 6 lines · Sean MacLennan
Quoted 3 lines · On Thu, 20 Mar 2008 17:26:42 -0500 "Scott Wood" <[email protected]> wrote:
Quoted 2 lines
ad7414 { compatible = "ad7414";
Quoted 7 lines
Quoted 1 line
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.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 3 lines · On Thu, 20 Mar 2008 22:34:21 -0600 "Grant Likely" <[email protected]>…
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
Quoted 8 lines · Sean MacLennan
Quoted 3 lines · On Thu, 20 Mar 2008 22:34:21 -0600 "Grant Likely" <[email protected]>…
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.
Signature · 4 lines
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
Quoted 10 lines
Quoted 6 lines
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
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
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.
Quoted 4 lines
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
Quoted 4 lines · Segher Boessenkool
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
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.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
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.
Quoted 11 lines
Quoted 4 lines
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.
Signature · 4 lines
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
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
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).
Quoted 5 lines
Quoted 2 lines
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
Quoted 15 lines · Segher Boessenkool
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
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).
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
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.
Quoted 10 lines
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.
Signature · 4 lines
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
Quoted 4 lines · On Thu, 27 Mar 2008 10:40:43 +1100 "David Gibson"…
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Note that a stock symbol needs to be written in uppercase; in lowercase, it is just a random name that has no collision protection.
Quoted 19 lines
Quoted 4 lines
Quoted 2 lines
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.
Quoted 10 lines
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