4. デバイスバインディング¶
この章には、特定のタイプおよびクラスのデバイスがデバイスツリーでどのように表されるかについての、バインディングと呼ばれる要件が含まれています。 デバイスノードの互換性プロパティは、ノードが準拠する特定のバインディング(または複数のバインディング)を記述します。
バインディングは、他のそれぞれの拡張として定義できます。 たとえば、新しいバスタイプは、シンプルバスバインディングの拡張として定義できます。 この場合、互換性のあるプロパティには、各バインディングを識別するいくつかの文字列が含まれます(最も具体的なものから最も一般的なものまで)(2.3.1 章, compatible を参照)。
4.1. バインディングガイドライン¶
4.1.1. General Principles¶
デバイスの新しいデバイスツリー表現を作成するときは、デバイスの必要なプロパティと値を完全に説明するバインディングを作成する必要があります。 この一連のプロパティは、デバイスドライバにデバイスの必要な属性を提供するために十分に説明的である必要があります。
推奨されるプラクティスには次のようなものがあります。
2.3.1 章 で説明されている規則を使用して、互換性のある文字列を定義します。
新しいデバイスに適用可能な標準プロパティ (
sect-standard-properties
およびsect-interrupts
で定義) を使用します。 通常、この使用法には、少なくともreg
およびinterrupts
プロパティが含まれます。
新しいデバイスが DTSpec で定義されたデバイス クラスの 1 つに適合する場合は、 4 章 (デバイス バインディング) で指定されている規則を使用します。
該当する場合は、
sect-misc-properties
で指定されたその他のプロパティ規則を使用します。
バインディングで新しいプロパティが必要な場合、プロパティ名の推奨形式は
"<company>,<property-name>"
です。 ここで、 ``<company>``は、OUI または、その作成者を識別する株式ティッカーのような短い一意の文字列でバインディングの作成者を識別します。例:
"ibm,ppc-interrupt-server#s"
4.1.2. その他のプロパティ¶
このセクションでは、多くのタイプのデバイスおよびデバイスクラスに適用できる有用なプロパティのリストを定義します。 これらは、名前と使用法の標準化を容易にするためにここで定義されています。
4.1.2.1. clock-frequency
プロパティ¶
プロパティ |
|
---|---|
値のタイプ |
|
説明 |
値は、次の2つの形式のいずれかの 周波数を指定する1つの 周波数を指定する |
4.1.2.2. reg-shift
プロパティ¶
プロパティ |
|
---|---|
値のタイプ |
|
説明 |
例えば、16540 UARTレジスタがアドレス 0x0、0x4、0x8、0xC、0x10、0x14、0x18、および0x1Cに配置されているシステムでは、 |
4.2. Serial devices¶
4.2.1. Serial Class Binding¶
The class of serial devices consists of various types of point to point serial line devices. Examples of serial line devices include the 8250 UART, 16550 UART, HDLC device, and BISYNC device. In most cases hardware compatible with the RS-232 standard fit into the serial device class.
I2C and SPI (Serial Peripheral Interface) devices shall not be represented as serial port devices because they have their own specific representation.
4.2.1.1. clock-frequency
Property¶
Property |
|
---|---|
Value type |
|
Description |
Specifies the frequency in Hertz of the baud rate generator's input clock. |
Example |
|
4.2.1.2. current-speed
Property¶
Property |
|
---|---|
Value type |
|
Description |
Specifies the current speed of a serial device in bits per second. A boot program should set this property if it has initialized the serial device. |
Example |
115,200 Baud: |
4.2.2. National Semiconductor 16450/16550 Compatible UART Requirements¶
Serial devices compatible to the National Semiconductor 16450/16550 UART (Universal Asynchronous Receiver Transmitter) should be represented in the devicetree using following properties.
Property Name |
Usage |
Value Type |
Definition |
---|---|---|---|
|
R |
<string list> |
Value shall include "ns16550". |
|
R |
|
Specifies the frequency (in Hz) of the baud rate generator’s input clock |
|
OR |
|
Specifies current serial device speed in bits per second |
|
R |
|
Specifies the physical address of the registers device within the address space of the parent bus |
|
OR |
|
Specifies the interrupts generated by this device. The value of the interrupts property consists of one or more interrupt specifiers. The format of an interrupt specifier is defined by the binding document describing the node’s interrupt parent. |
|
O |
|
Specifies in bytes how far the discrete device
registers are separated from each other. The
individual register location is calculated by
using following formula: |
|
SD |
|
See 2.3.7 章.
Specifies an effective address that maps to the
first physical address specified in the |
Usage legend: R=Required, O=Optional, OR=Optional but Recommended, SD=See Definition |
注釈
All other standard properties
(sect-standard-properties
) are allowed but are optional.
4.3. ネットワークデバイス¶
ネットワークデバイスは、パケット指向の通信デバイスです。 このクラスのデバイスは、7層OSIモデルのデータリンク層(レイヤー2)を実装し、Media Access Control (MAC) アドレスを使用すると想定されています。 ネットワークデバイスの例には、イーサネット、FDDI、802.11、およびトークンリングが含まれます。
4.3.1. ネットワーククラスバインディング¶
4.3.1.1. address-bits
プロパティ¶
プロパティ |
|
---|---|
値のタイプ |
|
説明 |
このプロパティは、MAC アドレスのビット数を指定します。 指定しない場合、デフォルト値は 48 です。 |
例 |
|
4.3.1.2. local-mac-address
プロパティ¶
プロパティ |
|
---|---|
値のタイプ |
16進数の配列としてエンコードされた |
説明 |
このプロパティを含むノードによって記述されたネットワークデバイスに割り当てられた MAC アドレスを指定します。 |
例 |
|
4.3.1.3. mac-address
プロパティ¶
プロパティ |
|
---|---|
値のタイプ |
16進数の配列としてエンコードされた |
説明 |
このプロパティは、ブートプログラムによってデバイスに割り当てられた MAC アドレスが local-mac-address プロパティと異なる場合に使用する必要があります。 このプロパティは、値が local-mac-address プロパティ値と異なる場合にのみ使用されます。 |
例 |
|
4.3.2. イーサネット固有の考慮事項¶
LAN 規格の IEEE 802.3 コレクション (まとめてイーサネットと呼ばれる) に基づくネットワーク デバイスは、ネットワーク デバイス クラスで指定されたプロパティに加えて、次のプロパティを使用してデバイス ツリーで表すことができます。
このセクションにリストされているプロパティは、ネットワーク デバイス クラスにリストされているプロパティを補強します。
4.3.2.1. max-speed
プロパティ¶
Property |
|
---|---|
Value type |
|
Description |
デバイスがサポートする最大速度 (メガビット/秒で指定) を指定します。 |
Example |
|
4.3.2.2. phy-connection-type
プロパティ¶
Property |
|
---|---|
Value type |
|
Description |
イーサネット デバイスと物理層 (PHY) デバイス間のインターフェイス タイプを指定します。 このプロパティの値は、実装に固有です。 推奨値を次の表に示します。 |
Example |
|
Connection type |
Value |
---|---|
Media Independent Interface |
|
Reduced Media Independent Interface |
|
Gigabit Media Independent Interface |
|
Reduced Gigabit Media Independent |
|
rgmii with internal delay |
|
rgmii with internal delay on TX only |
|
rgmii with internal delay on RX only |
|
Ten Bit Interface |
|
Reduced Ten Bit Interface |
|
Serial Media Independent Interface |
|
Serial Gigabit Media Independent Interface |
|
Reverse Media Independent Interface |
|
10 Gigabits Media Independent Interface |
|
Multimedia over Coaxial |
|
Quad Serial Gigabit Media Independent Interface |
|
Turbo Reduced Gigabit Media Independent Interface |
|
4.4. Power ISA Open PIC Interrupt Controllers¶
This section specifies the requirements for representing Open PIC compatible interrupt controllers. An Open PIC interrupt controller implements the Open PIC architecture (developed jointly by AMD and Cyrix) and specified in The Open Programmable Interrupt Controller (PIC) Register Interface Specification Revision 1.2 [b18].
Interrupt specifiers in an Open PIC interrupt domain are encoded with two cells. The first cell defines the interrupt number. The second cell defines the sense and level information.
Sense and level information shall be encoded as follows in interrupt specifiers:
0 = low to high edge sensitive type enabled 1 = active low level sensitive type enabled 2 = active high level sensitive type enabled 3 = high to low edge sensitive type enabled
Property Name |
Usage |
Value Type |
Definition |
---|---|---|---|
|
R |
|
Value shall include |
|
R |
|
Specifies the physical address of the registers device within the address space of the parent bus |
|
R |
|
Specifies that this node is an interrupt controller |
|
R |
|
Shall be 2. |
|
R |
|
Shall be 0. |
Usage legend: R=Required, O=Optional, OR=Optional but Recommended, SD=See Definition |
注釈
All other standard properties
(sect-standard-properties
) are allowed but are optional.
4.5. simple-bus
Compatible Value¶
System-on-a-chip processors may have an internal I/O bus that cannot be probed for devices. The devices on the bus can be accessed directly without additional configuration required. This type of bus is represented as a node with a compatible value of "simple-bus".
Property Name |
Usage |
Value Type |
Definition |
---|---|---|---|
|
R |
|
Value shall include "simple-bus". |
|
R |
|
This property represents the mapping between parent address to child address spaces (see 2.3.8 章, ranges). |
|
O |
|
Specifies that direct children of this bus should use non-posted memory accesses (i.e. a non-posted mapping mode) for MMIO ranges. |
Usage legend: R=Required, O=Optional, OR=Optional but Recommended, SD=See Definition |