Difference between revisions of "Device-tree documentation project"

From eLinux.org
Jump to: navigation, search
(fix a few sentences)
Line 38: Line 38:
  
 
== Issues ==
 
== Issues ==
Some areas of device tree bindings (and driver infrastructure) are in flux (e.g. pinctrl, dma).
+
Some areas of device tree bindings (and driver infrastructure) are
Would it be better to wait until these areas have settled down?
+
in flux (e.g. pinctrl, dma). Would it be better to wait until
 +
these areas have settled down?
 +
 
 +
Does throwing money at this project dis-incent volunteer effort?
  
 
== Related work ==
 
== Related work ==
 
* http://devicetree.org/Device_Tree_Usage - this is part of the device tree wiki
 
* http://devicetree.org/Device_Tree_Usage - this is part of the device tree wiki
* http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf - open-firmware device tree specification (requires registration?)
+
* http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf - open-firmware device tree specification
 +
** This requires registration? :-(
 
* Some 2013 kernel summit discussion entries:
 
* Some 2013 kernel summit discussion entries:
 
** http://lists.linuxfoundation.org/pipermail/ksummit-2013-discuss/2013-July/000127.html
 
** http://lists.linuxfoundation.org/pipermail/ksummit-2013-discuss/2013-July/000127.html
Line 53: Line 57:
  
 
== Some questions to answer ==
 
== Some questions to answer ==
Here are some possible questions that this documentation could address:
+
Here are some possible questions that this documentation could
(If these are already answered by the epar document, please cite the section:)
+
address: (If these are already answered by the epar document, please
 +
cite the section:)
  
1. What is a phandle?  How is it used? What rules are there for defining them? For referencing them?
+
1. What is a phandle?  How is it used? What rules are there for
 +
defining them? For referencing them?
  
 
2. How are #foo-cells used?
 
2. How are #foo-cells used?
  
3. What are the rules for naming attributes?  when should vendor qualifiers be used and when not?
+
3. What are the rules for naming attributes?  when should vendor
 +
qualifiers be used and when not?
  
4. How does device-tree interact with device instantiation - when is the device node created?, who creates it, when is the initcall called?  when is the probe function called?   
+
4. How does device-tree interact with device instantiation - when
 +
is the device node created?, who creates it, when is the initcall
 +
called?  when is the probe function called?   
  
5. How does device-tree interact with platform/bus instantiation? Do buses instantiate their children device nodes, or does the probe routine do this?
+
5. How does device-tree interact with platform/bus instantiation?
 +
Do buses instantiate their children device nodes, or does the probe
 +
routine do this?
  
6. what is the kernel API for interacting with device-tree?  What things are parsed automatically, vs. require manual (coded) parsing?
+
6. what is the kernel API for interacting with device-tree?  What
 +
things are parsed automatically, vs. require manual (coded) parsing?
  
 
== Scope ==
 
== Scope ==
A rough guess of the amount of work required for this document is approximately 3 months (12 person-weeks).
+
A rough guess of the amount of work required for this document is
 +
approximately 3 months (12 person-weeks).
  
 
== Contractor Candidates ==
 
== Contractor Candidates ==

Revision as of 12:13, 18 September 2013

Device-tree documentation project

Summary
Device-tree documentation project
Proposer
Tim Bird, Sony Mobile

Description

The Device Tree is a relatively new (for ARM Linux) framework for specifying the hardware configuration of a board to the Linux Kernel. New device drivers for many embedded products are always being produced, and it is strongly encouraged that new drivers and the board support for new ARM boards use device tree as part of their driver configuration. However, some areas of the device tree bindings are non-uniform and not well-documented.

This project would consist of documenting aspects of the device tree system that would be useful for:

  • board support developers (board/platform developers)
  • device driver developers
  • kernel sub-system maintainers

Kernel sub-system maintainers would be well-served by a document describing "rules", guidelines and best practices for device tree bindings.

Many documents exist which describe the syntax of the device tree, (such as the epar document, the device-tree wiki and the usage document in the kernel Documentation directory). However, some details are missing from these documents, and in some cases the explicit practices for working with device tree in the Linux kernel are different or have evolved from when these original documents were written.

The output from this effort would be a readily-accessible document. It would probably make sense to put the document in the kernel source tree, under Documentation/devicetree. Failing that, the document could be placed on the elinux wiki or the device tree wiki.

Issues

Some areas of device tree bindings (and driver infrastructure) are in flux (e.g. pinctrl, dma). Would it be better to wait until these areas have settled down?

Does throwing money at this project dis-incent volunteer effort?

Related work

Some questions to answer

Here are some possible questions that this documentation could address: (If these are already answered by the epar document, please cite the section:)

1. What is a phandle? How is it used? What rules are there for defining them? For referencing them?

2. How are #foo-cells used?

3. What are the rules for naming attributes? when should vendor qualifiers be used and when not?

4. How does device-tree interact with device instantiation - when is the device node created?, who creates it, when is the initcall called? when is the probe function called?

5. How does device-tree interact with platform/bus instantiation? Do buses instantiate their children device nodes, or does the probe routine do this?

6. what is the kernel API for interacting with device-tree? What things are parsed automatically, vs. require manual (coded) parsing?

Scope

A rough guess of the amount of work required for this document is approximately 3 months (12 person-weeks).

Contractor Candidates

  • Jonathan Corbet (output could also be part of LDD4??)
  • Thomas Petazzoni - is presenting a tutorial on device tree at ELCE
  • one of the device-tree maintainers? (Grant, Stephen, Mark, etc.)

Comments